中国大学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 }

 

posted @ 2019-03-24 17:55  硬盘红了  阅读(270)  评论(0编辑  收藏  举报