Create a program to allow the user to enter an unlimited amount of numbers. Also, they can enter the following commands:
- "sum", to display the sum of all the numbers entered so far.
- "view", to display all the numbers entered.
- "end", to quit the program.
This is an execution sample:
Number or command? 5
Number or command? 3
Number or command? view
Entered numbers:
5
3
Number or command? 6
Number or command? sum
Sum = 14
Number or command? -7
Number or command? end