![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++ Primer Plus
seenoor
这个作者很懒,什么都没留下…
展开
-
C++ Primer Plus 6.2
#include "iostream"#include using namespace std;int main(){ char ch; double a[10]; int i=0,j=0,number=0,m=0,tmp=0; double average,sum=0.0; cout.setf(ios::fixed); cin.get(ch); while(isdigit(ch)&& i0) { a[i]=a[i]*10+tmp; s++;原创 2011-02-25 14:08:00 · 334 阅读 · 0 评论 -
C++ Primer Plus 6.3
显示部分的那些句子参考了答案!#include using namespace std;void showmenu();int main(){ //while(cin.get()!='/n'); char ch; showmenu(); cin>>ch; while(ch!='c'&&ch!='C'&&ch!='p'&&ch!='P'&&ch!='t'&&ch!='T'&&ch!='g'&&ch!='G') { while(cin.get()!='/n');原创 2011-02-27 09:26:00 · 297 阅读 · 0 评论 -
C++ Primer Plus 6.4
#include using namespace std;const int strsize=20;const int listsize=5;void showmenu();struct bop{ char fullname[strsize]; //real name char title[strsize]; //job title char bopname[strsize]; //secret BOP name int preference; // 0 = fullname, 1 = title,原创 2011-02-27 09:28:00 · 257 阅读 · 0 评论 -
c++ Primer Plus 6.5
#include using namespace std;int main(){ cout>income&&income>=0) { if(income35000) tax=(15000-5000)*0.1+(35000-15000)*0.15+(income-35000)*0.2; cout原创 2011-02-27 10:05:00 · 292 阅读 · 0 评论 -
C++ Primer Plus 6.6
<br />#include <iostream>#include <string>#include <cstring>using namespace std;const int listsize=10;const int donation_money=1000;struct donation{ string name; double don;};int main(){ int num=0,i=0,j=0; cout<<"Please enter numb原创 2011-02-27 11:01:00 · 208 阅读 · 0 评论 -
C++ Primer Plus 6.8
<br />#include <iostream>#include <fstream>#include <cstdlib>const int SIZE = 60 ;int main(){ using namespace std; char filename[SIZE]; ifstream inFile; cout << "Enter name of data file: "; cin.getline(filename,SIZE);原创 2011-03-27 19:07:00 · 358 阅读 · 0 评论 -
C++ Primer Plus 7.2
<br />#include <iostream>const int Size=10;void in_score(int *,int *);void disp_score(const int *,int);void average_score(const int *,int);int main(){ int score[Size],l; in_score(score,&l); disp_score(score,l); average_s原创 2011-04-21 04:16:00 · 316 阅读 · 0 评论 -
C++ Primer Plus 7.3
<br />#include <iostream>#include <string> //#include <cstring> struct box{ char maker[40]; float height; float width; float length; float volume;};void Set_struct(box *);void Disp_struct(box);void main(){ using namespac原创 2011-04-21 18:55:00 · 335 阅读 · 0 评论 -
C++ Primer Plus 7.4
<br />//test 7.4 lotto--probability of winning#include <iostream>long double probability(unsigned numbers, unsigned picks);int main(){ using namespace std; /* //one field double total,choices; cout<< "Enter the total number原创 2011-04-23 02:48:00 · 309 阅读 · 0 评论