Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class something
- {
- public static void main(String[]args)
- {
- int value, finger;
- Scanner input = new Scanner(System.in);
- System.out.println("Enter the temperature in Fahrenheit");
- value = input.nextInt();
- for(int u = 0; u <= 20; u++ )
- {
- int y = centigrade(++value);
- System.out.println("Temperature of " + u + " Fahrenheit in centigrade is = " + y);
- }
- }
- public static int centigrade(int g)
- {
- int got = (g - 32);
- int banana = got * 5/9;
- return banana;
- }
- }
Add Comment
Please, Sign In to add comment