Advertisement
Josif_tepe

Untitled

Feb 17th, 2021
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. #include <stack>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     stack<int> s;
  10.     s.push(1);
  11.     s.push(2);
  12.     s.push(3);
  13.     s.push(4);
  14.     s.push(5);
  15.     s.push(6);
  16.    
  17.     while(!s.empty()) {
  18.         cout << s.top() << endl;
  19.         s.pop();
  20.     }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement