程序应显示如下的提示信息: Please input fahr: 然后输入一个十进制数并回车,然后程序以合适的消息形式输出转换后的华氏温度。 程序使用如下的公式完成转换:摄氏温度 = 5.0 *(华氏温度 – 32.0) / 9.0 **输入格式要求:"%lf" 提示信息:"Please input fahr: " **输出格式要求:"The cels is: %.2f" 程序运行示例; Please input fahr: 67 The cels is: 19.44
#include<stdio.h>
int main()
{
double f, c;
printf("Please input fahr: ");
scanf("%lf", &f);
c = 5*(f-32)/9.0;
printf("The cels is: %.2f", c);
return 0;
}