Facebook
From Insensitive Cat, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 86
  1. #include<stack>
  2.  
  3. #include<iostream> using namespace std;
  4.  
  5. int main()
  6.  
  7. stack<int>stosLiczb;
  8.  
  9. stosLiczb.push(5);
  10.  
  11. stosLiczb.push(6);
  12.  
  13. stosLiczb.push(3);
  14.  
  15. stosLiczb.push(2); cout<<stosLiczb.top()<<endl; cout<<stosLiczb.top() <<endl;
  16.  
  17. stosLiczb.pop();
  18.  
  19. stosLiczb.pop();
  20.  
  21. cout<<stosLiczb.top() <<endl;
  22.  
  23. stosLiczb.pop();
  24.  
  25. cout<<stosLiczb.top()<<endl; cout<<stosLiczb.size() <<endl;
  26.  
  27. return 0;