#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. NuGet:自定义配置信息(2)

    有些类库项目打包后,如何让别人引用的时候自动添加上对应的配置项目呢,比如EntityFramework的NuGet包,打开后可以看到类似下面的结构: 空白处右击——Add Content Folder ...

  2. Summary: Binary Search

    Iterative ways: int binarySearch (int[] a, int x) { int low = 0; int high = a.length - 1; int mid; w ...

  3. 1初识QT

    创建程序步骤: 打开Qt Creator 界面选择 New Project或者选择菜单栏 [文件]-[新建文件或项目]菜单项 弹出New Project对话框,选择Qt Widgets Applica ...

  4. 10588 - Queuing at the doctors

    这题wa 了 八次 你说 巨弱  orz 大神   总结一下  没有将所有的情况考虑清楚 ,当有的时候一个人已经全部看完的时候 别的人还没开始 但是我就把他给结束了 #include <iost ...

  5. linux基础命令---rm

    rm 删除文件和目录,默认情况下不会删除目录. 此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.SUSE.openSUSE.Fedora. 1.语法       rm [选项]  ...

  6. Linux服务器---设置服务启动

    设置服务开关 用户可以设置某项服务开机启动或者关闭,有图形界面和命令两种方式 1.图形界面 1)在终端输入命令setup,在弹出的界面选择“系统服务” 2)也可以直接在终端输入命令“ntsysv”,得 ...

  7. Java系列笔记(0) - 目录和概述

    笔者在开发过程中发现自己基础太薄弱,读书时除了系统学习了一下Java的基础语法和用法.一点简单的数据结构和设计模式之外,再无深入系统的学习,而工作中的学习也是东晃一枪西晃一枪,不够扎实和系统.想到一个 ...

  8. (二)github的价值意义篇

    为什么需要社会化编程? 如果您是程序员面试官,两者之间你会选择哪一位呢? 能查看以前所写代码的程序员 or 无法查看的程序员 精通最新软件的程序员 or 不精通的程序员 对语言或软件差异带来的不同文化 ...

  9. Hadoop MapReduce执行过程实例分析

    1.MapReduce是如何执行任务的?2.Mapper任务是怎样的一个过程?3.Reduce是如何执行任务的?4.键值对是如何编号的?5.实例,如何计算没见最高气温? 分析MapReduce执行过程 ...

  10. 简单的Django向HTML展示动态图片 案例——小白

    目标:通过Django向HTML传送图片展示 我的天哪,真是膈应人,网上的案例都不适合我,感觉所有的解决办法在我这里都不行. 好吧~ 是我菜,看不懂人家的代码,那句话叫啥来着?一本好经被傻和尚念歪了. ...