#include using namespace std; int top=-1; void push(int,int[]); int pop(int []); int main() { int a[50]; int num,p,b,i,c; while(i=1) { cout<<"What do u wish to do 1.Push 2.Pop"; cin>>num; switch(num) { case 1: cout<<"Enter the number you wish to push"; cin>>p; push(p,a); break; case 2: b=pop(a); cout<<"The number poped out is "<>c; if (c==1) { i=1; } else { i=0; } } return 0; } void push(int p,int a[50]) { if (top==49) { cout<<"Stack Full"; } else { top ++; a[top]=p; } } int pop(int a[50]) { int p; if(top==-1) { cout<<"Stack Empty"; } else { p=a[top]; top--; } return p; }