Fahrenheit to Celsius
Write a Program to convert the given temperature in Fahrenheit to Celsius using the following conversion formula C=F-32/1.8 and display the value in a tabular form.
PROGRAM:
import java.util.Scanner;
class P5
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter Temperature in Fahrenheit:=");
double f=sc.nextDouble();
double c=(f-32)/1.8;
System.out.println("Temperature in Celsius:="+c);
System.out.println("Temperature in Fahrenheit "+"= Temperature in Celsius");
System.out.println(f+" = "+c);
}
}
OUTPUT:

(Visited 1,411 times, 1 visits today)
Written by:
Thanks for the excellent manual