#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float f;
cin >> f;
float c = 5 * (f - 32) / 9;
cout << fixed << setprecision(2) << "c=" << c << endl;//fixed是小数点的意思,表示下面要对小数点后进行设置,setprecision是设置精度,括号中的数表示保留几位精度输出
//如果不用fixed,直接使用setprecision(int)则表示保留几位有效数字
getchar();
getchar();
return 0;
}
温度转换不重要,重要的是里面注释部分。长知识。