Guest User

Untitled

a guest
Jun 13th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class something
  4. {
  5. public static void main(String[]args)
  6. {
  7. int value, finger;
  8. Scanner input = new Scanner(System.in);
  9. System.out.println("Enter the temperature in Fahrenheit");
  10. value = input.nextInt();
  11.  
  12. for(int u = 0; u <= 20; u++ )
  13. {
  14. int y = centigrade(++value);
  15. System.out.println("Temperature of " + u + " Fahrenheit in centigrade is = " + y);
  16. }
  17. }
  18.  
  19. public static int centigrade(int g)
  20. {
  21. int got = (g - 32);
  22. int banana = got * 5/9;
  23. return banana;
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment