Chinaunix首页 | 论坛 | 博客
  • 博客访问: 473924
  • 博文数量: 120
  • 博客积分: 1853
  • 博客等级: 上尉
  • 技术积分: 1177
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-22 22:40
文章分类

全部博文(120)

文章存档

2013年(16)

2012年(104)

分类: C/C++

2012-06-02 23:08:43


点击(此处)折叠或打开

  1. bl#include <iostream>
  2. #include <stack>
  3. #include <string>
  4. using namespace std;

  5. int main(){

  6.     string s;
  7.     stack<string> st_str;

  8.     while(cin>>s){
  9.         st_str.push(s);
  10.     }
  11.     cin.clear();
  12.     while(st_str.empty() == false){
  13.         cout<<st_str.top()<<endl;
  14.         st_str.pop();
  15.     }
  16.     cout<<"our program runs well"<<endl;
  17.     return 0;
  18. }

阅读(446) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~