Monty374

Temp Convert

Sep 20th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package temp.converter;
  2.  
  3. import java.util.Scanner;
  4.  
  5. /**
  6. *
  7. * @author Monty
  8. */
  9. public class TempConverter {
  10.  
  11. /**
  12. * @param args the command line arguments
  13. */
  14. public static void main(String[] args) {
  15. double degf;
  16. double celsius;
  17. Scanner input = new Scanner(System.in);
  18. System.out.print("Enter fahrenheit: ");
  19. degf = input.nextDouble();
  20. celsius = ((degf-32)*5)/9;
  21. System.out.print("Celsius: " + celsius);
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment