#include <stdio.h>
int main( )
{
float f, c;
printf("输入摄氏温度:");
scanf("%f", &c);
f = c * 9.0 / 5.0 + 32; //9.0和9在数据类型上有区别,请参考有关资料,此外9.0写成9也可以
printf("对应的华氏温度为:%f\n", f);
return 0;
}
#include <stdio.h>
int main( )
{
float f, c;
printf("输入摄氏温度:");
scanf("%f", &c);
f = c * 9.0 / 5.0 + 32; //9.0和9在数据类型上有区别,请参考有关资料,此外9.0写成9也可以
printf("对应的华氏温度为:%f\n", f);
return 0;
}