Write a program that gets temperature from the user in Celsius and converts it into Fahrenheit using the formula F=9/5*C+32.

 

public static void main(String[] args) {

Scanner n=new Scanner(System.in);

float cel,fahr;

System.out.println(“Enter Temprature in celsious”);

cel= n.nextFloat();

fahr=9/5*cel+32;

System.out.println(“Temperature in Fahrenheit is =”+fahr);

}

}

Leave a Reply

Your email address will not be published. Required fields are marked *