第三章顺序结构,实现输入一个华氏温度f,要求输出摄氏温度c,公式f=9/5*c+32,要求输出结果保留到小数点后2位。
#include<stdio.h>
int main()
{
float f,c;
scanf("%f",&f);
c = (f - 32)*5/9;
printf("%.2f",c);
return 0;
}
#include<stdio.h>
int main()
{
float f,c;
scanf("%f",&f);
c = (f - 32)*5/9;
printf("%.2f",c);
return 0;
}