Advertisement
Kendred

F to C

Jan 25th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Program {
  4.  
  5. public static void main(String[] args) {
  6. // TODO Auto-generated method stub
  7. double f, c;
  8. Scanner sc = new Scanner(System.in);
  9. System.out.println("Enter o temperature in Degrees Fahrenheit");
  10. f = sc.nextDouble();
  11.  
  12. c = (f - 32) * 5/9;
  13.  
  14. System.out.println("That's" + c + " degrees");
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement