#include <iostream> #include <stack> using namespace std; int main() { stack <int> i; i.push(10); i.push(20); i.push(30); i.push(40); do { cout<<i.top()<<endl; i.pop(); }while(!i.empty()); system("pause"); return 0; }This is the output:
40 30 20 10
c, c++ , java, oracle, database design, c tutorial, c++ tutorial, java tutorial, oracle tutorial, programming, make program easy, c programming, c advance program, java advance program
#include <iostream> #include <stack> using namespace std; int main() { stack <int> i; i.push(10); i.push(20); i.push(30); i.push(40); do { cout<<i.top()<<endl; i.pop(); }while(!i.empty()); system("pause"); return 0; }This is the output:
40 30 20 10
All rights reserved||Using Deluxe Template By Klodian
0 comments:
Post a Comment