package Chapter_2;
import java.util.Scanner;
public class lianxi2_1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
double fahrenheit;
double celsius;
Scanner input=new Scanner(System.in);
System.out.print("请输入华氏温度:");
fahrenheit=input.nextDouble();
celsius=(fahrenheit-32)*5/9;
System.out.printf("对应的摄氏温度为:"+"%.2f",celsius);
}
}
华氏温度转化摄氏温度
最新推荐文章于 2021-03-26 00:00:00 发布