exercises 3.2

 1 #include <iostream>
 2 #include <string>
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using std::cout;
 5 using std::cin;
 6 using std::endl;
 7 using std::string;
 8 
 9 int main(int argc, char** argv) {
10     
11     string temp1,temp2;
12     //while(getline(cin,temp1))
13     //cout<<temp1<<endl;
14     
15     while(cin>>temp2)
16         cout<<temp2<<endl;
17 
18     return 0;
19 }

 

posted @ 2015-04-16 09:16  无敌烤皮蛋  阅读(87)  评论(0)    收藏  举报