What is output by the following Java code segment? int temp = 180;
```
while (temp != 80) {
if (temp > 90) {
System.out.print("This porridge is too hot! ");
// cool down
temp = temp – (temp > 150 ? 100 : 20);
}
else {
if (temp < 70) {
System.out.print("This porridge is too cold! ");
// warm up
temp = temp + (temp < 50 ? 30 : 20);
}
}
}
if (temp == 80) {
System.out.println("This porridge is just right!");
}
```
a. This porridge is too cold! This porridge is just right!
b. This porridge is too hot! This porridge is just right!
c. This porridge is just right!
d. None of the above.
b. This porridge is too hot! This porridge is just right!
You might also like to view...
All of the following are methods of the Scanner class except:
a. nextFloat() b. next() c. useDelimiter() d. readLine()
A web server's reply to a request is known as the ____________________.
Fill in the blank(s) with the appropriate word(s).