自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(45)
  • 资源 (1)
  • 收藏
  • 关注

原创 C++ primer plus第六版课后编程练习答案:8.4

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<cstring>using namespace std;struct stringy{ char* str; int ct;};void set(stringy& s1, const char* c1);void show(const stringy& s

2016-10-06 13:17:54 678

原创 C++ primer plus第六版课后编程练习答案:8.3

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<cctype>#include<string>#include<cstring>using namespace std;void MyToupper(string& str1);int main(){ string str; cout << "Ente

2016-10-06 13:16:41 751

原创 C++ primer plus第六版课后编程练习答案:8.2

#define _CRT_SECURE_NO_WARNINGS #include <iostream>using namespace std;struct CandyBar{ char* Brand; double Weight; int Heat;};void set(CandyBar& s1, char* b1 = "Millennium Munch", dou

2016-10-06 13:14:08 749

原创 C++ primer plus第六版课后编程练习答案:8.1

#define _CRT_SECURE_NO_WARNINGS #include <iostream>using namespace std;void print(char* str, int n=0);int number = 0;int main(){ print("Touch"); print("touch"); print("kaziya"); pr

2016-10-06 13:12:54 657

原创 C++ primer plus第六版课后编程练习答案:7.4

#define _CRT_SECURE_NO_WARNINGS #include <iostream>long double probability(unsigned numbers, unsigned picks);int main(){ using namespace std; double total1, choices1, total2, choices2;

2016-09-03 16:56:56 685

原创 C++ primer plus第六版课后编程练习答案:7.3

#define _CRT_SECURE_NO_WARNINGS #include <iostream>struct box{ char maker[40]; float height; float width; float length; float volume;};void value_box(box maker1);void address_

2016-09-03 16:56:07 495

原创 C++ primer plus第六版课后编程练习答案:7.2

#define _CRT_SECURE_NO_WARNINGS #include <iostream>void golf_score(int score[]);void show_score(const int* show_score);double average_score(const int* caculate_score);int i;int main(){ double

2016-09-03 16:54:23 399

原创 C++ primer plus第六版课后编程练习答案:7.1

#define _CRT_SECURE_NO_WARNINGS #include <iostream>double harmonic_average(double x, double y);int main(){ double x, y; std::cout << "Please enter two numbers(0 to quit): "; std::cin >> x

2016-09-03 16:53:04 760

原创 Objective-C初学:属性

初学属性的一些总结,便于自己理解和记忆。

2016-04-19 23:03:20 384

原创 C++ primer plus第六版课后编程练习答案:6.8

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<fstream>#include<cstdlib>using namespace std;int main(){ char ch; int count=0; ifstream Love; Love.open("E:/Her.txt");

2016-04-16 19:18:31 640

原创 C++ primer plus第六版课后编程练习答案:6.7

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<cctype>using namespace std;int main(){ char words[20]; int vowels = 0; int consonants = 0; int others=0; cout << "Ent

2016-04-16 19:17:53 529

原创 C++ primer plus第六版课后编程练习答案:6.6

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<string>using namespace std;struct Activist_funds{ string name; double deposit;};int main(){ int i; cout << "Please ent

2016-04-16 19:17:07 673

原创 C++ primer plus第六版课后编程练习答案:6.5

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<array>#include<cctype>using namespace std;const double tax_in_5000=0;const double tax_5001_to_15000=0.10;const double tax_15001_to_350

2016-04-16 19:16:40 487

原创 C++ primer plus第六版课后编程练习答案:6.4

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<array>#include<cctype>using namespace std;const int strsize = 30;//结构描述struct bop{ char fullname[strsize]; char title[strsize]

2016-04-16 19:14:47 702

原创 C++ primer plus第六版课后编程练习答案:6.3

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<array>#include<cctype>using namespace std;int main(){ char ch; cout << "Please enter one of the following choices:\n"; cout

2016-04-16 19:09:21 690

原创 C++ primer plus第六版课后编程练习答案:6.2

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<array>#include<cctype>using namespace std;int main(){ const int Artsize = 10; array<double,10>donation; double num; int

2016-04-16 19:08:46 606

原创 C++ primer plus第六版课后编程练习答案:6.1

#define _CRT_SECURE_NO_WARNINGS #include <iostream>#include<cctype>using namespace std;int main(){ char ch; cout << "Enter something(@ to quit):\n"; while ((ch = cin.get()) !='@') {

2016-04-16 19:08:09 1172

原创 Objective-C初学: 对象的初始化

Objective-C中的对象初始化

2016-04-14 17:05:50 2995

原创 5.10

#define _CRT_SECURE_NO_WARNINGS #include using namespace std;int main(){ int i, k,row; cin >> row; for (i = 0; i < row; i++) { for (k = 0; k < row-i-1; k++) { cout << '.'; } for

2016-03-03 11:21:58 430

原创 5.9

#define _CRT_SECURE_NO_WARNINGS #include #include #includeusing namespace std;int main(){ string test; cout << "Enter words (to stop ,type the word done)" << endl; int counts = 0; do{

2016-03-03 11:21:22 310

原创 5.8

#define _CRT_SECURE_NO_WARNINGS #include#includeusing namespace std;int main(){ cout<<"Enter words(to stop,type the word done)"<<endl; char test[20]; int count = 0; char ch; int i = 0; d

2016-03-03 11:20:03 344

原创 5.7

#define _CRT_SECURE_NO_WARNINGS #include#includeusing namespace std;struct car{ string name; int years;};int main(){ int i; cout << "How many cars do you wish to catalog?"; (cin >> i).g

2016-03-03 11:18:42 265

原创 5.6

#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std;int main(){ const int Years = 3; const int Months = 12; const char* Month[Months] = { "January", "February", "Match", "Apri

2016-03-03 11:17:47 305

原创 5.5

#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std;int main(){ const int Months = 12; const char* Month[Months] = { "January", "February", "Match", "April", "May", "June",

2016-02-27 22:38:16 292

原创 5.4

#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std;int main(){ const double Simple_interest = 0.10;//Daphne投的单利 const double Compound_interest = 0.05;//Cleo投的复利 const int Primary_depo

2016-02-27 22:37:13 371

原创 5.3

#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std;int main(){ int number; cout << "Enter a number please: "; cin >> number; int sum = 0; while (number != 0) { sum += number; c

2016-02-27 22:36:28 253

原创 5.2

#define _CRT_SECURE_NO_WARNINGS #include#includeusing namespace std;int main(){ const int ArSize = 101;//注意array对象的边界 arrayfactorials; factorials[0] = factorials[1] = 1; cout << "0!= " << fa

2016-02-27 22:35:25 263

原创 5.1

#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std;int main(){ int sum = 0; int small, big; cout << "Enter two numbers please:\n"; cin >> small; cin >> big; for (; small <=big; sma

2016-02-27 22:34:23 268

原创 4.10

#define _CRT_SECURE_NO_WARNINGS#include#includeusing namespace std;int main(){ double sum = 0; arrayaverage_for_40meter; for (int i = 0; i < 3; i++) { cout << "Please enter the scores of

2016-01-28 15:07:18 304

原创 4.9

#define _CRT_SECURE_NO_WARNINGS#includeusing namespace std;struct CandyBar{ char brand[20]; double weight; int calorie;};int main(){ CandyBar *snack = new CandyBar; cout << "Enter the ca

2016-01-28 15:06:15 329

原创 4.8

#define _CRT_SECURE_NO_WARNINGS#includeusing namespace std;struct ww_service{ char name[30]; double diameter; double weight;};int main(){ ww_service* pizza=new ww_service; cout << "Ente

2016-01-28 15:05:34 361

原创 4.7

#define _CRT_SECURE_NO_WARNINGS#includeusing namespace std;struct ww_service{ char name[30]; double diameter; double weight;};int main(){ ww_service pizza; cout << "Enter the company of

2016-01-28 15:04:48 329

原创 4.6

#define _CRT_SECURE_NO_WARNINGS#includeusing namespace std;struct CandyBar{ char brand[20]; double weight; int calorie;};int main(){ CandyBar snack[3] { { "Mocha Munch", 2.3, 350 },

2016-01-28 15:04:07 316

原创 4.5

#define _CRT_SECURE_NO_WARNINGS#includeusing namespace std;struct CandyBar{ char brand[20]; double weight; int calorie;};int main(){ CandyBar sanck { "Mocha Munch", 2.3, 350 }; cout

2016-01-28 15:03:08 730

原创 4.4

#define _CRT_SECURE_NO_WARNINGS#include#includeusing namespace std;int main(){ string first_name; string last_name; cout << "Enter your first name : "; getline(cin,first_name); cout << "E

2016-01-28 15:00:53 287

原创 4.3

#define _CRT_SECURE_NO_WARNINGS#include#includeusing namespace std;int main(){ char first_name[20]; char last_name[20]; cout << "Enter your first name : "; cin.getline(first_name, 20); cou

2015-11-03 14:34:28 322

原创 4.2

#define _CRT_SECURE_NO_WARNINGS#include#includeusing namespace std;int main(){ string name; string dessert; cout << "Enter your name : \n"; getline(cin, name);//此处getline()不是类方法。将cin作为参数,指出

2015-11-03 14:33:15 450

原创 4.1

#define _CRT_SECURE_NO_WARNINGS//消除微软的安全警告,比如scanf等函数,详细可百度#include#includeusing namespace std;int main(){ struct information//定义描述结构体 { char first_name[20]; char last_name[20]; char gra

2015-11-03 14:31:25 294

原创 3.7

#includeint main(){ using namespace std; const double One_hundred_kilometers_to_miles = 62.14;//100公里=62.14英里 const double Gallons_to_liters = 3.875;//1加仑=3.875升 float consumption_of_liter;

2015-11-03 14:30:13 380

原创 3.6

#includeint main(){ using namespace std; long kilometer,liter; cout << "Please enter the number of kilometers: "; cin >> kilometer; cout << "Enter the number of liters: "; cin >> liter;

2015-11-03 14:28:26 419

C++primer plus(1~13章)课后编程练习答案

我本人学习《C++ primer plus第六版》的时候所做的1~13章节的课后编程练习答案,当时的编译环境是vs2013,绝对可以通过,供大家参考.网上这本书的课后答案真的好少啊,好在我也慢慢学过来了。

2015-12-27

空空如也

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

TA关注的人

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