1063: 华氏温度转换为摄氏温度
Description
输入华氏温度f,计算并输出相应的摄氏温度c(保留2 位小数)。c = 5/9(f-32).
Input
输入一个实数x表示华氏温度
Output
输出对应的摄氏温度
Sample Input
17.2
Sample Output
The temprature is -8.22
代码
#include<stdio.h>
int main()
{
float f,c;
scanf("%f",&f);
c=5.0*(f-32)/9.0;
printf("The temprature is %.2f",c);
return 0;
}