Computer Science, asked by SuraishwaryaDe, 16 days ago

write a program to input the temperature in celsius and convert it into fahrenheit.if the temperature is more than 98.6F then display Fever otherwise normal. Java program​

Answers

Answered by sharonrobinson0030
2

Answer:

import java.io.*; public class KboatTemperature { public static void main(String args[]) throws IOException { InputStreamReader read = new InputStreamReader(System.in); BufferedReader in = new BufferedReader(read); System.out.print("Enter temperature in Celsius: "); double cel = Double.parseDouble(in.readLine()); double far = 1.8 * cel + 32; if (far > 98.6) System.out.println("Fever"); else System.out.println("Normal"); }

Similar questions