Advertisement
Waliullah8328

Fahrenheit To Celsius

Jan 26th, 2021
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package basicjava;
  2.  
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class FahrenheitToCelsius {
  7.     public static void main(String[] args) {
  8.         Scanner input = new Scanner(System.in);
  9.         System.out.print("Enter your  Fahrenheit temperature: ");
  10.         double n = input.nextDouble();
  11.         double cel = 0.5556*(n-32);
  12.        
  13.         System.out.println("Celsius Temperature : " +cel);
  14.        
  15.     }
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement