C - The C Answer (2nd Edition) - Exercise 1-4
来源:互联网 发布:windows安装部署hive 编辑:程序博客网 时间:2024/05/04 00:29
/*Write a program to print the corresponding Celsius to Fahrenheit table.*/#include <stdio.h>/* print Celsius-Fahrenheit table for celsius = 0, 20, ..., 300; floating-point version */main(){ float fahr, celsius; int lower, upper, step; lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 20; /* step size */ printf("Celsius Fahr\n"); celsius = lower; while (celsius <= upper) { fahr = (9.0 * celsius) / 5.0 + 32.0; printf("%3.0f %6.1f\n", celsius, fahr); celsius += step; }}/* Output:Celsius Fahr 0 32.0 20 68.0 40 104.0 60 140.0 80 176.0100 212.0120 248.0140 284.0160 320.0180 356.0200 392.0220 428.0240 464.0260 500.0280 536.0300 572.0Press any key to continue . . .*/
1 0
- C - The C Answer (2nd Edition) - Exercise 1-4
- C - The C Answer (2nd Edition) - Exercise 1-2
- C - The C Answer (2nd Edition) - Exercise 1-1
- C - The C Answer (2nd Edition) - Exercise 1-3
- C - The C Answer (2nd Edition) - Exercise 1-5
- C - The C Answer (2nd Edition) - Exercise 1-6
- C - The C Answer (2nd Edition) - Exercise 1-7
- C - The C Answer (2nd Edition) - Exercise 1-8
- C - The C Answer (2nd Edition) - Exercise 1-9
- C - The C Answer (2nd Edition) - Exercise 1-10
- C - The C Answer (2nd Edition) - Exercise 1-11
- C - The C Answer (2nd Edition) - Exercise 1-12
- C - The C Answer (2nd Edition) - Exercise 1-13
- C - The C Answer (2nd Edition) - Exercise 1-14
- C - The C Answer (2nd Edition) - Exercise 1-15
- C - The C Answer (2nd Edition) - Exercise 1-16
- C - The C Answer (2nd Edition) - Exercise 1-17
- C - The C Answer (2nd Edition) - Exercise 1-18
- 如何有效的报告BUG
- 关于多线程输入参数和返回值的几种情况
- Haskell趣学指南学习日记(4)-强大的函数
- STM32W108无线射频模块外部中断接口应用实例
- 关于DOM的优化以及js的性能问题
- C - The C Answer (2nd Edition) - Exercise 1-4
- 基于同一工作空间的分层项目实战笔记
- ubuntu 安装截图工具 Shutter,并设置快捷键 Ctrl+Alt+A
- 【cocos2d-x 报错异常集】error C2665: “cocos2d::LabelTTF::create”: 2 个重载中没有一个可以转换所有参数类型
- 【cocos2d-x】AnchorPoint
- 微信公众平台开发教程1
- Java进阶(极客)——观察者模式(二)概述及内置观察者模式
- c++uml关系总结(关联,聚合,组合,依赖。。。)
- Android 蓝牙学习