| 70 | } |
| 71 | }; |
| 72 | int main() |
| 73 | { |
| 74 | Stack s ; |
| 75 | s.push(1); |
| 76 | s.push(2); |
| 77 | s.push(3); |
| 78 | s.push(4); |
| 79 | s.push(5); |
| 80 | s.push(6); |
| 81 | s.push(7); |
| 82 | s.push(8); |
| 83 | cout<<"Size of Stack :- "<<s.Size()<<endl; |
| 84 | cout<<s.top()<<endl; |
| 85 | s.pop(); |
| 86 | cout<<s.top()<<endl; |
| 87 | s.pop(); |
| 88 | cout<<s.top()<<endl; |
| 89 | s.pop(); |
| 90 | cout<<s.top()<<endl; |
| 91 | cout<<s.top()<<endl; |
| 92 | s.pop(); |
| 93 | cout<<s.top()<<endl; |
| 94 | s.pop(); |
| 95 | cout<<s.top()<<endl; |
| 96 | s.pop(); |
| 97 | cout<<s.top()<<endl; |
| 98 | s.pop(); |
| 99 | cout<<s.top()<<endl; |
| 100 | return 0 ; |
| 101 | } |