Given that the int variable temp contains a temperature that is not negative, write a Java statement

Question:

Given that the int variable temp contains a temperature that is not negative, write a Java statement that uses the conditional operator to set the String variablelabel to either "degree" or "degrees". We want to use label to produce grammatically correct output, such as 0 degrees, 1 degree, 2 degrees, and so on. If you have not studied the conditional operator, use an if-else statement instead.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: