Advertisement
WGray8899

F to C

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