描述
利用公式C = 5*(F-32)/9(其中C表示摄氏温度,F表示华氏温度)进行计算转化,输入华氏温度F,输出摄氏温度C,要求精确到小数点后5位。
输入
输入一行,包含一个实数f,表示华氏温度。
输出
输出一行,包含一个实数,表示对应的摄氏温度,要求精确到小数点后5位。
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
int a;
cin>>a;
cout<<fixed<<setprecision(5)<<(double)5*(a-32)/9<<endl;
return 0;
}