Advertisement
Josif_tepe

Untitled

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