1.

(write a program to input the temperature in Celsius and convert it into fahrenheit if the temperature is more than 98.6 degree fahrenheit then display fever otherwise normal) .. using #JAVA .  using #BUFFERED READER #wrong answer will be reported.....

Answer»

Program to convert Celsius into Fahrenheit:import java.io.*;class BRAINLY{public static VOID main(String args[]) throws IOEXCEPTION{double cel,fah;InputStreamReader in = new InputStreamReader(System.in);BufferedReader br = new BufferedReader(in);System.out.println("ENTER temperature in celsius: ");cel = Double.parseDouble(br.readLine());fah = (9.0/5.0) * cel + 32;System.out.println("Temperature in fahrenheit is :" +fah);if(fah > 98.6){System.out.println("Fever");}else{System.out.println("Normal");}}}Output:Enter temperature in Celsius : 28.5Temperature in Fahrenheit is : 83.3000000000001NormalHope it helps!



Discussion

No Comment Found