Example 59: Implementation of a Stack of Integers
Write a program to implement a stack data structure.
Stack is a LIFO (Last In First Out) list in which addition and deletion occur at the same end.
How does Stack work?
|What it does
|Inserts an element at the top
|Removes an element from the top and returns it