#include<iostream>

using namespace std;

int main()
{
cout << "My name is Jiantong Chen." << endl << "I'm a student in the Xi'an University.";
cin.get();
return ;
}

#include<iostream>
using namespace std; int main()
{
int a;
cout << "Please enter a number of the long:";
cin >> a;
cout << endl << "The ma of it is:" << (a*);
cin.get();
cin.get();
return ;
}

#include<iostream>
void print_1(void);
void print_2(void); using namespace std; int main()
{
print_1();
print_1();
print_2();
print_2();
cin.get();
return ;
} void print_1(void)
{
cout << "Three blind mice" << endl;
} void print_2(void)
{
cout << "See how they run" << endl;
}

#include<iostream>

using namespace std;

int main()
{
int age;
cout << "Enter you age:";
cin >> age;
cout << endl << "This age contains " << (age*) << " months.";
cin.get();
cin.get();
return ;
}

#include<iostream>
using namespace std;
double convert(double); int main()
{
int Celsius;
double Fahrenheit;
cout << "Please enter a Celsius value: ";
cin >> Celsius;
Fahrenheit = convert(Celsius);
cout << endl << Celsius << " degrees Celsius is " << Fahrenheit << " degrees Fahrenheit.";
cin.get();
cin.get();
return ;
} double convert(double Celsius)
{
double Fahrenheit;
Fahrenheit = 1.8*Celsius + 32.0;
return Fahrenheit;
}

#include<iostream>
using namespace std;
double convert(double); int main()
{
double in_put;
double out_put;
cout << "Enter the number of light years: ";
cin >> in_put;
out_put = convert(in_put);
cout << endl << in_put << " light years = " << out_put << " astronomical units.";
cin.get();
cin.get();
return ;
} double convert(double in_put)
{
double out_put;
out_put = in_put * ;
return out_put;
}

#include<iostream>
using namespace std;
void display(int, int); int main()
{
int hours;
int minutes; cout << "Enter the number of hours : ";
cin >> hours;
cout << "Enter the number of minutes : ";
cin >> minutes; display(hours, minutes);
cin.get();
cin.get();
return ;
} void display(int a,int b)
{
cout << "Time: " << a << ":" << b;
}

c++ primer plus 第二章 课后题答案的更多相关文章

  1. 《80x86汇编语言程序设计教程》第二章课后题答案

    2.5 习题 2.1 数据寄存器 1. 八个通用寄存器除了各自规定的专门用途外,它们均可以用于传送和暂存数据,可以保存算术逻辑运算中的各种操作数和运算结果. 2.1 AX和Al寄存器又称为累加器(ac ...

  2. Java程序设计(2021春)——第二章课后题(选择题+编程题)答案与详解

    Java程序设计(2021春)--第二章课后题(选择题+编程题)答案与详解 目录 Java程序设计(2021春)--第二章课后题(选择题+编程题)答案与详解 第二章选择题 2.1 面向对象方法的特性 ...

  3. c++ primer plus 第七章 课后题答案

    #include <iostream> using namespace std; double HAR_AVG(double, double); void TEST(bool); int ...

  4. c++ primer plus 第六章 课后题答案

    #include <iostream> #include <cctype> using namespace std; int main() { char in_put; do ...

  5. c++ primer plus 第五章 课后题答案

    #include <iostream> using namespace std; int main() { ; cout << "Please enter two n ...

  6. c++ primer plus 第四章 课后题答案

    #include<iostream> #include<string> using namespace std; int main() { string first_name; ...

  7. c++ primer plus 第三章 课后题答案

    #include<iostream> using namespace std; int main() { ; int shen_gao; cout <<"Please ...

  8. python核心编程第4章课后题答案(第二版75页)

    4-1Python objects All Python objects have three attributes:type,ID,and value. All are readonly with ...

  9. python核心编程第3章课后题答案(第二版55页)

    3-4Statements Ues ; 3-5Statements Use\(unless part of a comma-separated sequence in which case \ is ...

随机推荐

  1. TempData["a"]多个Action方法之前共享数据

    ViewData["a"]只可以在自己视图的页面里被访问,但TempData["a"]可以多个Action方法之前共享数据,比如在 @{Html.RenderA ...

  2. linux命令:压缩解压命令

    压缩解压命令:gzip 命令名称:gzip 命令英文原意:GNU zip 命令所在路径:/bin/gzip 执行权限:所有用户 语法:gzip 选项  [文件] 功能描述:压缩文件 压缩后文件格式:g ...

  3. Twitter OA prepare: Two Operations

    准备T家OA,网上看的面经 最直接的方法,从target降到1,如果是奇数就减一,偶数就除2 public static void main(String[] args) { int a = shor ...

  4. 读书--编写高质量代码 改善C#程序的157个建议

    最近读了陆敏技写的一本书<<编写高质量代码  改善C#程序的157个建议>>书写的很好.我还看了他的博客http://www.cnblogs.com/luminji . 前面部 ...

  5. jquery 删除table行,该如何解决

    query 删除table行< table >  < tbody >  < tr >  < td > 这行原来就有 </ td >  < ...

  6. sql 关于存储过程的查询

    --查数据库中所有的存储过程select * from sys.procedures ----------------------查数据库中所有的存储过程select o.name from sysc ...

  7. Filter—过滤器

    过滤器的作用是什么? 1.拦截传入的请求和传出的响应,能拿到请求和响应中的数据 2.监视,修改,或处理正在客户端和服务器之间交换的数据流 3.利用过滤器的执行时机,实现Web程序的预处理,和后期的处 ...

  8. 1mysql的安装

    1.mysql的安装:(1).在'开始'出搜索 'cmd';(2).打开mysql所在磁盘和文件 并安装 d: d:\>cd mysql d:\mysql>cd bin d:\mysql\ ...

  9. byte、二进制、十进制数值之间的转换

    项目中遇到将字节数据文件解析成可展示的十进制,经过调查和测试得出下面的转换方法 1.将byte值转换为二进制字符串: byte byteValue = -1; // 将byte转换为8位二进制字符串 ...

  10. 微信公众号为什么要加粉?流量,广告,KPI,吸粉,增粉

    微信公众号为什么要加粉?流量,广告,KPI,吸粉,增粉 1.曾有人这样比喻:当你的粉丝超过100人时,你就像是一本内刊:超过1000人,你就像个布告栏:超过1万人,你就好比一本杂志:超过10万人,你就 ...