华氏温度转换为摄氏温度

 1 #include "stdafx.h"
 2 #include <math.h>
 3 
 4 
 5 
 6 int main(int argc, char* argv[])
 7 {
 8     double f;
 9     double c=0;
10     printf("请输入华氏温度\n");
11     scanf("%lf",&f);
12     c=(f*1.0-32.0)*5/9.0;
13     printf("对应的摄氏温度为 %lf \n",c);
14     return 0;
15 }

主要涉及的是浮点数之间的运算。

原文地址:https://www.cnblogs.com/tk091/p/2489218.html