每日一题 2

第二题:编写程序,将华氏度转换为摄氏度。转换公式为: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);
}

猜你喜欢

转载自blog.csdn.net/drake_gagaga/article/details/113146344