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
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
English,
8 days ago
Accountancy,
8 days ago
Math,
8 days ago
Social Sciences,
16 days ago
Social Sciences,
16 days ago
English,
8 months ago
Math,
8 months ago
English,
8 months ago