简单Demo之温度转换

 1 #include<stdio.h>
 2 
 3 #define UPPER 300
 4 #define LOWER 0
 5 #define STEP  20
 6 void main()
 7 {
 8     printf("fahr	celsius
");
 9     for (int fahr = LOWER; fahr <= UPPER; fahr += STEP)
10     {
11         printf("%3d	%6.1f
", fahr, (5.0 / 9.0)*(fahr - 32));
12     }
13 }
TempTrans

原文地址:https://www.cnblogs.com/wangzefeng/p/5309942.html