2029: C语言实验——温度转换
Time Limit: 1 Sec Memory Limit: 64 MB Submit: 12 Solved: 10 [ ][ ][ ]Description
输入一个华氏温度,输出摄氏温度,其转换公式为:C=5(F-32)/9。
Input
输入数据只有一个实数,即华氏温度。
Output
输出数据只有一个,即摄氏温度,保留2位有效数字。
Sample Input
32.0
Sample Output
0.00
HINT
Source
1 #include2 #include 3 using namespace std; 4 5 int main() 6 { 7 float f; 8 cin>>f; 9 f=(5*(f-32))/9;10 printf("%.2f\n",f);11 return 0;12 }
Freecode :