Advertisement
Nikki12345671

F to C

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