Displaying temperature and pressure at the same time using java

Do you agree with that?

No. You are still dividing by a, even if a is 0.