#include<iostream>

using namespace std;

int main()
{
stack mystack;
mystack.push(10);
mystack.push(20);
mystack.push(30);
mystack.push(40);
mystack.push(50);

while (!mystack.empty()) {
    cout << ' ' << mystack.top();
    mystack.pop();
}

}

By RRR

Leave a Reply

Your email address will not be published.