#include<stdio.h>
/*当fahr=0,20,...,300时,打印华氏温度与摄氏温度对照表;
浮点数版本*/
main ()
{
float fahr,celsius;
int lower,upper,step;
lower=;/*温度表的下限*/
upper=;/*温度表的上限*/
step=;/*步长*/
fahr=lower;
printf("华氏温度与摄氏温度对照表\n");/*标题*/
while (fahr <= upper)
{
celsius=(5.0/9.0)*(fahr-32.0);
printf("%3.0f %6.1f\n",fahr,celsius);
fahr=fahr+step;
}
}

运行结果:

最新文章

  1. nodejs进阶(1)—输出hello world
  2. spring整合hibernate的时候报异常org.hibernate.HibernateException: createQuery is not valid without active transaction
  3. JDBC进行批处理
  4. sqlite 使用记录
  5. Java基础之写文件——缓冲区中的多条记录(PrimesToFile3)
  6. html5面向对象做一个贪吃蛇小游戏
  7. POJ 2528 Mayor’s posters
  8. bzoj3996
  9. spring util命名空间
  10. linux上svn连接visual svn server时ssl鉴权失败,问题解决(转)
  11. Codeforces554D:Kyoya and Permutation
  12. prototype原型解析
  13. ng-model,ng-value,ng-bind,{{}}----angularJS数据绑定
  14. 第二个项目:WC
  15. TYVJ P1039 【忠诚2】
  16. For、Foreach、和Parallel.For等简单的速度检测
  17. 【转载】C#工具类:Json操作帮助类
  18. CentOS7 配置静态 ip
  19. C++ 大学课堂知识点总结
  20. 6. 纯 CSS 绘制一颗闪闪发光的璀璨钻石

热门文章

  1. flask前后端数据交互
  2. Linux-线程常见函数
  3. php 查看接口运行时间
  4. python 手动安装模块
  5. 17.3.10---&gt;关于数值溢出问题
  6. openvino资源
  7. win10下载软件防止被杀
  8. typescript-学习使用ts-1
  9. 2019ICPC 上海网络赛 L. Digit sum(二维树状数组+区间求和)
  10. apt源换国内源