美文网首页算法编程
L1-004. 计算摄氏温度

L1-004. 计算摄氏温度

作者: Mr_欢先生 | 来源:发表于2017-03-12 17:40 被阅读7次

    L1-004. 计算摄氏温度

    问题描述:
    描述
    java代码:
    import java.util.Scanner;
    
    /**
     * Created by pc on 17-3-12.
     */
    public class Main {
        public static void main (String [] args){
            Scanner input = new Scanner(System.in);
            int i_f = input .nextInt();
            int i_c=5*(i_f-32)/9;
            System.out.print("Celsius = "+i_c);
    
        }
    }
    
    结果
    Paste_Image.png

    相关文章

      网友评论

        本文标题:L1-004. 计算摄氏温度

        本文链接:https://www.haomeiwen.com/subject/udfxnttx.html