C++ Primer Plus 编程练习答案
C++ Primer Plus 编程练习答案,正在不断更新中!!!
爱编程的小兵
这个作者很懒,什么都没留下…
展开
-
C++ Prime Plus 第六版 第十章 编程练习 对象和类 参考答案 详细版
以下答案本人在VS2019中均已亲自测试编译通过,完美运行. 10.1 //Bank.h #pragma once #include<iostream> class BankAccounts { public: BankAccounts(); BankAccounts(const std::string& name, const std::string& a...原创 2020-02-13 19:41:29 · 317 阅读 · 0 评论 -
C++ Prime Plus 第六版 第九章 内存模型于名称空间 编程练习 参考答案 详细版
以下答案本人在VS2019中均已亲自测试编译通过,完美运行. 9.1 //golf.h文件 #ifndef GOLF_H #define GOLF_H const int len = 40; struct golf { char fullname[len]; int handicap; }; void setgolf(golf & g, const char ...原创 2020-02-07 18:46:07 · 421 阅读 · 0 评论 -
C++ Prime Plus 第六版 第八章 函数探幽 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 8.1 #include<iostream> using namespace std; void fun(const char *, int flag = 0); int main(void) { const int size = 20; char str[size] = "I am is ...原创 2020-02-04 00:51:23 · 408 阅读 · 2 评论 -
C++ Prime Plus 第六版 第七章 函数——C++模块 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 复习题8: #include<iostream> using namespace std; int replace(char * str, char c1, char c2); int main() { const int size = 20; char str[size] = "ajajj...原创 2020-01-31 19:48:05 · 397 阅读 · 0 评论 -
C++ Prime Plus 第六版 第六章 分支语句和逻辑运算符 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 6.1 #include<iostream> #include<cctype> using namespace std; int main() { char ch; while(cin.get(ch) && ch != '@') { if(...原创 2020-01-31 19:37:05 · 395 阅读 · 0 评论 -
C++ Prime Plus 第六版 第五章 循环和关系表达式 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 5.1 #include<iostream> using namespace std; int main() { int i,num1,num2,sum=0; cout << "请输入两个整数:"; cin >> num1 >> num2; ...原创 2020-01-31 19:19:49 · 253 阅读 · 0 评论 -
C++ Prime Plus 第六版 第四章 复合类型 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 4.1 #include<iostream> using namespace std; int main() { const int size = 30; char name1[size]={0}; char name2[size]={0}; char grade; ...原创 2020-01-31 19:16:11 · 335 阅读 · 2 评论 -
C++ Prime Plus 第六版 第三章 处理数据 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 3.1 #include<iostream> using namespace std; int main(void) { const int factor=12; double tall,Tall; cout << "请输入您的身高(单位:英寸):___\b\b\b"; ...原创 2020-01-31 19:04:16 · 194 阅读 · 0 评论 -
C++ Prime Plus 第六版 第二章 开始学习C++ 编程练习 参考答案 详细版
以下答案本人在linux vscode中均已亲自测试编译通过,完美运行. 2.1 #include<iostream> using namespace std; int main(void) { char name[20]="某某某"; char address[50]="山西省吕梁市孝义市"; cout<<"姓名:"<<name&...原创 2020-01-31 18:51:55 · 334 阅读 · 0 评论