1-4 编写一个程序打印摄氏温度转换为响应环视温度的转换表.

 1 #include<stdio.h>
 2 int main()
 3 {
 4     float fahr, celsius;
 5     int lower, upper, step;
 6 
 7     lower = 0;
 8     upper = 300;
 9     step = 20;
10     celsius = lower;
11     printf("Celsius To Fahr Table\n");
12     while (celsius <= upper)
13     {
14         fahr = celsius*(9.0 / 5.0) + 32.0;
15         printf("%3.0f %6.1f\n", celsius, fahr);
16         celsius = celsius + step;
17     }
18     return 0;
19 }
练习1-4

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-01-18
  • 2021-05-11
  • 2021-04-26
  • 2021-07-01
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案