-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemperature.java
More file actions
21 lines (19 loc) · 677 Bytes
/
Copy pathtemperature.java
File metadata and controls
21 lines (19 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package conditionals;
import java.util.Scanner;
public class temperature {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.print("Enter the conditionals.temperature in Celsius:");
float tempC = input.nextFloat();
float tempF = (float)(tempC * 1.8) + 32;
if (tempF >= 102){
System.out.println("HIGH FEVER" + " Temp in Fahrenheit: " + tempF);
}
else if (tempF >= 100){
System.out.println("FEVER" + " Temp in Fahrenheit: " + tempF);
}
else {
System.out.println("NORMAL" + "Temp in Fahrenheit: " + tempF);
}
}
}