Advertisement
Josif_tepe

Untitled

Feb 12th, 2021
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include<ctype.h>
  3. #include<cmath>
  4. #include<iomanip>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <queue>
  8. #include <stack>
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     stack<int> s;
  14.     s.push(1);
  15.     s.push(2);
  16.     s.push(3);
  17.     s.push(4);
  18.    
  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