Description
输入一个华氏温度,要求输出摄氏温度。公式为 c=5(F-32)/9 输出要求有文字说明,取位2小数。
Input
一个华氏温度,浮点数
Output
摄氏温度,浮点两位小数
#include <stdio.h>
int main(){
float t;
scanf("%f",&t);
float c=5*(t-32)/9;
printf("c=%.2f",c); //保留两位小数
return 0;
}
Description
输入一个华氏温度,要求输出摄氏温度。公式为 c=5(F-32)/9 输出要求有文字说明,取位2小数。
Input
一个华氏温度,浮点数
Output
摄氏温度,浮点两位小数
#include <stdio.h>
int main(){
float t;
scanf("%f",&t);
float c=5*(t-32)/9;
printf("c=%.2f",c); //保留两位小数
return 0;
}