programming-examples/java/_Basics/Java program to convert Fahrenheit to Celsius.java

14 lines
401 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
import java.util.*;
class FahrenheitToCelsius
{
public static void main(String[] args)
{
float temperatue;
Scanner in = new Scanner(System.in);
System.out.println("Enter temperatue in Fahrenheit");
temperatue = in.nextInt();
temperatue = ((temperatue - 32)*5)/9;
System.out.println("Temperatue in Celsius = " + temperatue);
}
}