Josif_tepe

Untitled

Oct 15th, 2025
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. #include <queue>
  4. #include <vector>
  5. #include <queue>
  6. #include <stack>
  7. using namespace std;
  8.  
  9. int main() {
  10.     stack<int> st;
  11.    
  12.     st.push(1);
  13.     st.push(2);
  14.     st.push(3);
  15.     st.push(4);
  16.    
  17.    
  18.     while(!st.empty()) {
  19.         cout << st.top() << " ";
  20.         st.pop();
  21.     }
  22.    
  23.    
  24.    
  25.    
  26.    
  27.    
  28.  
  29.     return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment