摘要: #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 编程的爬行者 阅读(100) 评论(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 编程的爬行者 阅读(143) 评论(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 编程的爬行者 阅读(142) 评论(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 编程的爬行者 阅读(107) 评论(0) 推荐(0) 编辑