The Program simulates the stack functions as per indicated in: http://www.cplusplus.com/reference/stack/stack/
Main
- Empty This function determines whether the stack is empty or not. If the function is empty, it outputs such a statement. Otherwise, it will say so as well and print out the size of the stack.
- Size This functions determines the number of elements in the stack. The size is tracked by a counter initialized in the beginning of the loop.
- Top This function outputs the top element in the stack.
- Push This function appends the integer value inputted by user.
- Pop This function removes the top element from the stack.
- Print Stack This function prints all the elements in the stack, separated by a space each.
- Exit This function exits the program.
Struct
- Node This constructs the node