自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 c++ Primer Plus 第十一章 答案

第1题 头文件和函数定义和原文相同 vector.h #ifndef VECTOR_H_ #define VECTOR_H_ #include <iostream> namespace VECTOR { class Vector { public: enum Mode { RECT, POL }; private: double x; double y; double mag; double ang; Mode mode; void set_mag();

2020-12-02 00:12:33 319

原创 c++ Primer Plus 第十章 答案

第1题 bankaccount.h //bankaccount.h #ifndef BANKACCOUNT_H_ #define BANKACCOUNT_H_ class Bankaccount { private: std::string m_name; std::string m_account; double m_money; public: Bankaccount(); Bankaccount(const std::string& name, const std::strin

2020-11-25 21:55:30 438

原创 c++ Primer Plus 第九章 答案

第1题: golf.h //golf.h #ifndef GOLF_H_ #define GOLF_H_ const int Len = 4; struct golf { char fullname[Len]; int handicap; }; void setgolf(golf& g, const char* name, int hc); int setgolf(golf& g); void handicap(golf& g, int hc); void showg

2020-11-05 22:49:21 510

原创 c++ Primer Plus 第八章 答案

1、 #include <iostream> using namespace std; void show(const char* str, int n = 0); int main() { char c[40] = "shixiaochuan"; cout << "First time:\n"; show(c); cout << "First time:\n"; show(c, 1); cout << "Second times:\n";

2020-10-25 00:45:54 287

原创 c++ Primer Plus 第七章 答案

第1题 #include <iostream> using namespace std; double harmean_result(double x, double y); int main() { cout << "Input two numbers (0 to quit): "; double x, y; while (cin >> x >> y && x != 0 && y != 0) { cout &lt

2020-10-19 14:31:08 274

原创 c++ Primer Plus 第六章 答案

第1题 #include <iostream> #include <cctype> using namespace std; int main() { char ch; cout << "Enter something: "; while (cin.get(ch) && ch != '@') { if (!isdigit(ch)) { if (isalpha(ch)) { if (isupper(ch)) {

2020-09-29 00:56:40 176

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除