3)Marcus+Goh

using namespace std;
 * 1) include
 * 2) include

class stack { private: int top; char array[5]; bool F, E;

public: stack { top=0; } ~stack{};

bool push { if (top<5) { char a; cout << "So what do you want: " << endl; cin >> a; array[top]=a; top++; } else { cout << "The stack that you have just pushed is not available, please try again later" << endl; } }

bool pop { if (top>-1) { top--; array[top] = ' '; } }

bool is_empty{ if (top==0) { cout << "Dull and hollow with nothing" << endl; return 1; } else return 0; }

bool is_full{ if (top==5) { cout << "Going explode" << endl; return 1; } else return 0; }

void display{ int i; cout << "First to Last: " << endl; for (i=0; i<5; i++){ cout << array[i] << " "; } }

};

int main{ stack lala; int w;

while (w!=9){

cout << "You want to push(1), pop(2), display(3) or you came here by accident(9)?" << endl; cin >> w;

if (w==1) { lala.push; }

else if (w==3) { if(lala.is_empty==1){ cout<<"Nothing to display"<<endl; } else{ lala.display; cout<<endl; } }

else if (w==2){ if(lala.is_empty==1){ cout<<"Nothing to pop"<<endl; } else{ lala.pop; cout<<endl; }

} }

system ("pause"); return 0; }