3. Write a Java program to input the temperature in Celsius and convert it into Fahrenheit. If
the temperature is more th
an 98.6 F then display "Fever" otherwise "Normal".
Answers
Answered by
5
Answer: The required Java program is :-
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Enter the temperature (in °C) : ");
double tempC = scan.nextDouble();
scan.close();
double tempF = (1.8*tempC)+32;
if(tempF > 98.6) {
System.out.println("Fever");
}
else {
System.out.println("Normal");
}
}
}
Please mark it as Brainliest.
Similar questions
Geography,
2 months ago
CBSE BOARD XII,
2 months ago
World Languages,
2 months ago
Science,
4 months ago
Math,
4 months ago
Science,
10 months ago
Chemistry,
10 months ago
Math,
10 months ago