c primer plus(第五版)中文版 第五章 编程练习
来源:互联网 发布:js onmousemove 编辑:程序博客网 时间:2024/05/17 09:11
5.8华氏温度变摄氏温度和绝对温度
#include <stdio.h>
void Temperatures(double);
int main(void)
{
double Fahrenheit;
// scanf("%lf",&Fahrenheit);
while(scanf("%lf",&Fahrenheit)==1) //scanf的返回值代表成功输入的变量的数目,非数字不会被成功输入
{
Temperatures(Fahrenheit);
scanf("%lf",&Fahrenheit);
}
printf("error input\n");
return 0;
}
void Temperatures(double num)
{
double Celsius,Kelvin;
const double a=1.8;
const double b=32.0;
const double c=273.16;
Celsius=a*num+b;
Kelvin=Celsius+c;
printf("%lf Fahrenheit is %.2lf Celsius and %.2lf Kelvin\n",num,Celsius,Kelvin);
}
- c primer plus(第五版)中文版 第五章 编程练习
- C primer plus(第五版)编程练习第五章
- C++.Primer.Plus第五版第五章编程练习答案
- C Primer Plus (第五版) 第五章 编程练习 答案
- c++primer plus第五章编程练习
- 记录——《C Primer Plus (第五版)》第八章编程练习第五题
- 记录——《C Primer Plus (第五版)》第十章编程练习第五题
- 《C Primer Plus 第五版》第十章编程练习
- C primer plus(第五版)编程练习第二章
- C primer plus(第五版)编程练习第三章
- C primer plus(第五版)编程练习第四章
- C primer plus(第五版)编程练习第六章
- C primer plus(第五版)编程练习第七章
- C primer plus(第五版)编程练习第八章
- C primer plus(第五版)编程练习第九章
- C primer plus(第五版)编程练习第十章
- C primer plus(第五版)编程练习第十一章
- C primer plus(第五版)编程练习第十二章
- 红黑树
- 八款开源 Android 游戏引擎
- Java how to program(4th)中的专业词汇ch10
- 杨毅:不够优秀就不要腆着脸继续占便宜
- java: cannot execute binary file问题的解决
- c primer plus(第五版)中文版 第五章 编程练习
- poj 1010 邮票问题 DFS
- 活着
- Static Import 用法之 Constant Utility Class
- 一致性哈希算法(Consistent Hashing)
- [转]游戏动画中欧拉角与万向锁的理解
- C++实现广义欧几里得除法计算最大公因数
- 母亲的信任
- Android学习笔记(3)————Android四大组件之三(Content Provider)(代码示例待补全)