Write an if/else statement that assigns true to the variable fever if the variable temperature is greater than 98.6; otherwise it assigns false to fever.

LANGUAGE: JAVA

CHALLENGE:

Write an if/else statement that assigns true to the variable fever if the variable temperature is greater than 98.6; otherwise it assigns false to fever.

SOLUTION:

if (temperature > 98.6) fever = true;
else fever = false;

Posted in ,