English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write an if-else statement that outputs the word Hot provided the value of the variable temp is greater then or equal to 85 and also the value of the variable humidity is greater than or equal to 90. Otherwise, the if-else statement outputs the word nice. The variables temp and humidity are both of type int.

2007-06-26 15:08:25 · 2 answers · asked by ZG786 1 in Computers & Internet Programming & Design

2 answers

if ((temp >= 85) && (humidity >= 90)) {
System.out.print("Hot");
} else {
System.out.print("nice");
}

2007-06-26 15:14:25 · answer #1 · answered by McFate 7 · 0 0

if (temp>= 85 && humidity >=90)
System.out.println("Hot");
else
System.out.println("Nice");

2007-06-26 22:17:31 · answer #2 · answered by TrilingAnarchy 3 · 0 0

fedest.com, questions and answers