/*温度转换:求华氏温度150F对应的摄氏温度,试编写相应的程序*/
#include<stdio.h>
int main(){
int fahr=150,celsius;
celsius=(fahr-32)*5/9;
printf("%d",celsius);
return 0;
}
运行结果:

本文展示了如何使用C语言编写一个简单的程序,将华氏温度150度转换为摄氏温度,并给出了相应的代码和运行结果。
/*温度转换:求华氏温度150F对应的摄氏温度,试编写相应的程序*/
#include<stdio.h>
int main(){
int fahr=150,celsius;
celsius=(fahr-32)*5/9;
printf("%d",celsius);
return 0;
}
运行结果:

1103
1520