- 博客(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
720
原创 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
807
原创 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
817
原创 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
699
原创 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
755
原创 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
532
原创 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
434
原创 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
814
原创 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
683
原创 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
565
原创 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
787
原创 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
574
原创 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
759
原创 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
735
原创 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
649
原创 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
1219
原创 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
465
原创 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
358
原创 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
385
原创 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
299
原创 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
348
原创 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
328
原创 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
425
原创 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
290
原创 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
312
原创 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
302
原创 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
345
原创 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
372
原创 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
400
原创 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
347
原创 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
342
原创 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
808
原创 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
329
原创 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
357
原创 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
500
原创 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
326
原创 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
419
原创 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
491
C++primer plus(1~13章)课后编程练习答案
2015-12-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人