第二题:编写程序,将华氏度转换为摄氏度。转换公式为:c = 5 * (华氏度f - 32) / 9;其中,c为摄氏度,f为华氏度
#include"stdio.h"
void main()
{
float f,c;
printf(“please input the Fahrenheit :\n”);
scanf("%f",&f);
c=(f-32)*5/9.0;
printf(“the Celsius degree is :%.2f \n”,c);
}
第二题:编写程序,将华氏度转换为摄氏度。转换公式为:c = 5 * (华氏度f - 32) / 9;其中,c为摄氏度,f为华氏度
#include"stdio.h"
void main()
{
float f,c;
printf(“please input the Fahrenheit :\n”);
scanf("%f",&f);
c=(f-32)*5/9.0;
printf(“the Celsius degree is :%.2f \n”,c);
}