摘要: #include using namespace std;void showmenu(void){ cout>input; while(input) { switch(input) { case 'c':cout>input; } system("pause"); return 0;} 阅读全文
posted @ 2013-12-01 02:08 编程的爬行者 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;const int MAXSIZE=10;int main(){ double dd[MAXSIZE]; double donation; double aver=0; int num=0; int i=0; while(i>donation && !isdigit(donation)) { dd[i]=donation; aver+=dd[i]; i++; //(cin>>donation).get(); } if(i) aver=aver/i; else aver=0; fo... 阅读全文
posted @ 2013-12-01 01:34 编程的爬行者 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int main(){char ch;while((ch=cin.get())!='@'){if(isdigit(ch))continue;else if(islower(ch))ch-='z'-'Z';else if(isupper(ch))ch+='z'-'Z';cout<<ch;}system("pause");return 0;} 阅读全文
posted @ 2013-11-30 23:39 编程的爬行者 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){int num;cout>num).get();for(int i=1;i0;j--)cout<<".";for(int k=1;k<=i;k++)cout<<"*";cout<<endl;}system("pause");return 0;} 阅读全文
posted @ 2013-11-29 23:13 编程的爬行者 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int main (){string words;int i=0;cout>words).get();while(words!="done"){i++;(cin>>words).get();}cout<<"You entered a total of "<<i<<" words.";system("pause");return 0;} 阅读全文
posted @ 2013-11-29 22:58 编程的爬行者 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include #include const MAXSIZE=100;using namespace std;int main (){char words[MAXSIZE];int i=0;cout>words).get();while(strcmp(words,"done")){i++;(cin>>words).get();}cout<<"You entered a total of "<<i<<" words.";system("pause");retur 阅读全文
posted @ 2013-11-29 22:38 编程的爬行者 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;struct car{string pro;int year;};int main(){int num;cout>num).get();//注意将输入后的回车键转换成的换行符读取并丢弃car *newcar=new car[num];for(int i=0;i>newcar[i].year).get();//注意将输入后的回车键转换成的换行符读取并丢弃cout<<"Here is your collection:"<<endl;for(int j=0;j<n 阅读全文
posted @ 2013-11-29 21:49 编程的爬行者 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;const MAXSIZE=12;const year=3;int main(){char *month[MAXSIZE]={"Janury","February","March","April","May","June","July","August","September","October","November", 阅读全文
posted @ 2013-11-26 16:35 编程的爬行者 阅读(86) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;const MAXSIZE=12;int main(){char *month[MAXSIZE]={"Janury","February","March","April","May","June","July","August","September","October","November","Decembe 阅读全文
posted @ 2013-11-26 16:20 编程的爬行者 阅读(99) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){double count=0;long double cleo=100;long double dap=100;do{cleo+=cleo*0.05;dap+=10;count++;}while(cleo<dap);cout<<"经过"<<count<<"年,cleo的财富 "<<cleo<<" 超过了"<<"dap的财富 "<<dap<&l 阅读全文
posted @ 2013-11-26 14:33 编程的爬行者 阅读(95) 评论(0) 推荐(0) 编辑