Write a CPP program to implement the STACKS concept.
Use ONLY arrays , functions(methods), loops, if or switch statements .
NO CLASSES , NO Pointers and NO Structures.
The user is to select a choice from a menu to call any of the following functions:
create(s);
push(s,i) <<<== before pushing an item on the stack, make sure that the stack is not full.
Note (items pushed on the stack are ints between 0 and 99)
pop(s,i), <<<= before popping an item off the stack make sure that the stack is not empty
top(s) << == before displaying the top of the STACK make sure that the stack is not empty
purge(s)
check if stack is empty empty(s).
Stack Menu Prompt
Type A to push a number to the stack
Type B to pop a number from the stack
Type C to output the top of the stack
Type D to purge the stack Type E
B
Error underflow, stack is Empty
A
Enter a number between 0 and 99 to push to the stack: 1
Items on the Stack: 1
Stack Menu Prompt
Type A to push a number to the stack
Type B to pop a number from the stack
Type C to output the top of the stack
Type D to purge the stack Type E
A
Enter a number between 0 and 99 to push to the stack: 200
Wrong input try again
Enter a number between 0 and 99 to push to the stack: 20
Items on the Stack: 1 20
Stack Menu Prompt
Type A to push a number to the stack
Type B to pop a number from the stack
Type C to output the top of the stack
Type D to purge the stack Type E
C
Top of the Stack: 20
Stack Menu Prompt
Type A to push a number to the stack
Type B to pop a number from the stack
Type C to output the top of the stack
Type D to purge the stack Type E
B
20 is popped
Items on the Stack: 1