Java program to convert Fahrenheit to Celsius

Java-Expoit














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);
  }
}
Output 
Fahrenheit to Celsius Java program output

For Celsius to Fahrenheit conversion use
T = 9*T/5 + 32
where T is temperature on Celsius scale.

Discover more from PlusDigit

Subscribe to get the latest posts sent to your email.

Discover more from PlusDigit

Subscribe now to keep reading and get access to the full archive.

Continue reading

AdBlock Detected!

Please disable your AdBlocker to access this website.

Once disabled, this message will disappear automatically.