中国大学MOOC-JAVA学习(浙大翁恺)—— 温度转换

 1 import java.util.Scanner;
 2 
 3 public class Main {
 4 
 5     public static void main(String[] args) {
 6         // TODO Auto-generated method stub
 7         int f;
 8         int c;
 9         Scanner in = new Scanner(System.in);
10         f = in.nextInt();
11         c = (f-32) * 5/9;
12         System.out.println((int)c);
13     }
14 
15 }

猜你喜欢

转载自www.cnblogs.com/pxy-1999/p/10589315.html