简单Demo之温度转换
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include<stdio.h> 2 3 #define UPPER 300 4 #define LOWER 0 5 #define STEP 20 6 void main() 7 { 8 printf("fahr\tcelsius\r\n"); 9 for (int fahr = LOWER; fahr <= UPPER; fahr += STEP) 10 { 11 printf("%3d\t%6.1f\r\n", fahr, (5.0 / 9.0)*(fahr - 32)); 12 } 13 }
posted on 2016-03-23 10:19 wangzefeng 阅读(145) 评论(0) 编辑 收藏 举报