#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. Locust性能测试3-no-web模式和csv报告保存

    前言 前面是在web页面操作,需要手动的点start启动,结束的时候也需要手工去点stop,没法自定义运行时间,这就不太方便. locust提供了命令行运行的方法,不启动web页面也能运行,这就是no ...

  2. Python做接口自动化测试框架

    框架结构如下: Test_Api_Project||---base.py|---base_api| |---register_api.py | |---send_sms_code_api.py|--- ...

  3. Docker深入浅出2

    Docker系统架构 Docker使用客户端-服务端(c/s)架构模式,使用远程api来管理和创建Docker容器. docker容器通过Docker镜像来创建. 容器与镜像的关系类似于面向对象编程中 ...

  4. webapi 返回json及route设置

    1.返回json 修改App_Start/webapiconfig public static void Register(HttpConfiguration config) { // Web API ...

  5. 7zip

    1.下载地址. https://www.7-zip.org/ 2.傻瓜式安装.

  6. form表单提交 type="submit"

    <form action=""  method="post" onsubmit="return validte()"> < ...

  7. ADO.NET知识学习总结

      1. 概述 使用的命名空间: System.Data.SqlClient 连接字符串    服务器/数据库实例+数据库名称+安全信息+用户名+密码  可参考http://www.connectio ...

  8. 统计方法运行时间【Java实现】

    接口Command:定义命令的执行操作 package common; public interface Command { // 运行方法 void run(); } CommandRuntime ...

  9. linux基础命令---tr

    tr 删除或者更改文件中的字符串,这个指令一般需要两个字符集. 此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.SUSE.openSUSE.Fedora. 1.语法       ...

  10. SACD ISO镜像中提取DSDIFF(DFF)、DSF文件

                      听语音 | 浏览:5620 | 更新:2015-08-25 11:46 | 标签:硬件 1 2 3 4 5 分步阅读 现在有一种比较流行的无损音乐传输介质是SACD ...