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
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.
Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
ANSWER You can use the following statement with the co... View full answer
Get step-by-step solutions from verified subject matter experts
