Int temp; temp = 180; if ( temp > 90 ) { System.out.println( "This porridge is too hot." ); // cool down temp = temp – ( temp > 150 ? 100 : 20 ); } // end if else { if ( temp < 70 ) { System.out.println("This porridge is too cold."); // warm up temp = temp + (temp < 50 ? 30 : 20); } // end if } // end else if ( temp == 80 ) System.out.println( "This porridge is just right!" );

Solved
Show answers

Ask an AI advisor a question