1. void push(int): 將一個元素加入堆疊的頂部；

2. int pop(void): 從堆疊的頂部移除一個元素；

3. int top(void): 檢查堆疊頂部的元素；

4. bool isempty(void): 檢查堆疊是否為空。

1. 將一個元素加入堆疊的頂部;

2. 從堆疊的頂部移除一個元素，並印出該元素的值

3. 測試堆疊是否為空的，

4. 從底部至頂部列堆疊列中所有元素的值

5. 終止程式執行。

 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 20 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 15 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 4 The stack elements are (from bottom to top):     20     15     30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 2 The poped element: 30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 3 The top element: 15 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 10 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 4 The stack elements are (from bottom to top):     20     15     10 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 5