首页 技术 正文
技术 2022年11月12日
0 收藏 586 点赞 2,414 浏览 1246 个字
 1 void ch2_1() {
2 using namespace std;
3 cout << "xxxxxxxx" << endl;
4 }
5
6 void ch2_2() {
7 using namespace std;
8 double num;
9 cout << "please input a distance in long: ";
10 cin >> num;
11 cout << "it equals " << num * 220 << endl;
12 }
13
14 void ch2_3_1() {
15 using namespace std;
16 cout << "Three blind mice" << endl;
17 }
18
19 void ch2_3_2() {
20 using namespace std;
21 cout << "See how they run" << endl;
22 }
23
24 void ch2_3() {
25 using namespace std;
26 ch2_3_1();ch2_3_1();
27 ch2_3_2();ch2_3_2();
28 }
29
30 void ch2_4() {
31 using namespace std;
32 unsigned int age;
33 cout << "enter your age: ";
34 cin >> age;
35 cout << "months: " << age * 12 << endl;
36 }
37
38 double ch2_5_1(double c){
39 using namespace std;
40 return c * 1.8 + 32;
41 }
42
43 void ch2_5() {
44 using namespace std;
45 double c;
46 cout << "enter a celsius value: ";
47 cin >> c;
48 cout << c << "degrees Celsius is " << ch2_5_1(c) << " degrees Fahrenheit" << endl;
49 }
50
51 double ch2_6_1(double lyear){
52 return lyear * 63240;
53 }
54
55 void ch2_6() {
56 using namespace std;
57 double lyear;
58 cout << "enter the number of light years: ";
59 cin >> lyear;
60 cout << lyear << " light years = " << ch2_6_1(lyear) << " astronomical units" << endl;
61 }
62
63 void ch2_7_1(unsigned int h, unsigned int m){
64 using namespace std;
65 cout << "Time: " << h << ":" << m << endl;
66 }
67
68 void ch2_7() {
69 using namespace std;
70 unsigned int h, m;
71 cout << "enter the number of hours: ";
72 cin >> h;
73 cout << "enter the number of minutes: ";
74 cin >> m;
75 ch2_7_1(h, m);
76 }
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,086
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,561
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,410
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,183
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,820
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,903