fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. stack<int>st;
  7. st.push(5);
  8. st.push(7);
  9. st.push(0);
  10. st.push(71);
  11. st.push(51);
  12. st.push(74);
  13. st.push(50);
  14. st.push(71);
  15. while(!st.empty())
  16. {
  17. cout<<st.top()<<endl;
  18. st.pop();
  19.  
  20.  
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
71
50
74
51
71
0
7
5