Advertisement
MSN69

Untitled

Feb 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Project1 {
  4.  
  5. public static void main (String [] Args) {
  6. Scanner read = new Scanner (System.in);
  7.  
  8. double f;
  9. double k;
  10. double c;
  11. System.out.println("Please enter the temperature in Fahrenheit value");
  12. f = read.nextInt();
  13. k = (f+459.67)*(5/9);
  14. System.out.println("Fahrenheit to Kelvin conversion equals :"+k);
  15. c = (f-32)*(5/9);
  16. System.out.println("Fahrenheit to Celsius conversion equals:"+c);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement