题目描述
编一程序,将摄氏温度换为华氏温度。公式为:f=9/5*c+32。其中f为华氏温度,c是摄氏温度。(5.2.12)
输入
输入一行,只有一个整数c
输出
输出只有一行,包括1个实数。(保留两位小数)
#include <stdio.h>
int main(){
int c;
float f;
scanf("%d",&c);
f=9.0/5*c+32;
printf("%.2f",f);
return 0;
}
题目描述
编一程序,将摄氏温度换为华氏温度。公式为:f=9/5*c+32。其中f为华氏温度,c是摄氏温度。(5.2.12)
输入
输入一行,只有一个整数c
输出
输出只有一行,包括1个实数。(保留两位小数)
#include <stdio.h>
int main(){
int c;
float f;
scanf("%d",&c);
f=9.0/5*c+32;
printf("%.2f",f);
return 0;
}