> 其他 >
编程序,输入一个华氏温度,要求输出摄氏温度.公式为c=5/9(F-32)输出要有文字说明,取2位小数.
人气:292 ℃ 时间:2020-05-10 15:22:35
解答
华氏转摄氏公式:T ℉ = 1.8t℃ + 32
#include
int main()
{
float f,c;
printf("输入华氏温度:\n");
scanf("%f",&f);
c=(f-32)/1.8;
printf("对应的摄氏温度是:%5.2f\n",c);
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版