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.....
Answers
Answer:
// Celsius to Fahrenheit conversion in Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CelsiusToFahrenheit {
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please enter temperature in Celsius : ");
double celsius = Double.parseDouble(reader.readLine());
double fahrenheit = (9.0/5.0)*celsius + 32;
System.out.println("Temperature in Fahrenheit is : "+fahrenheit);
if (celsius>98.6)
{
System.out.println("You have fever) ;
}
else
{
System.out.println("Normal")
}
}
Explanation:
hope it will help
Answer:
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.5 Temperature in Fahrenheit is: 83.3000000000001 Normal