总时间限制: 1000ms 内存限制: 65536kB
利用公式 C = 5 * (F-32) / 9 (其中C表示摄氏温度,F表示华氏温度) 进行计算转化。
输入
输入一行,包含一个实数f,表示华氏温度。(f >= -459.67)
输出
输出一行,包含一个实数,表示对应的摄氏温度,要求精确到小数点后5位。
用Java运行 不要用c/c++
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
double f;
Scanner sc=new Scanner(System.in);
f=sc.nextDouble();
double c=5*(f-32)/9;
System.out.println(String.format("%.5f",c));
}
}