Write a simple calculator program.
Perform addition, subtraction, multiplication, and division.
You should check for division by zero if dividing.
Print out a menu that prompts the user to make a choice.
Ask the user to enter two numbers.
Determine the operation selected using an IF statement.
Perform the calculation.
Output the result.
Outline:
- Define four variables (num1, num2, result, action).
- Display menu to the user.
- Prompt the user to make a selection.
- Ask the user to enter the first number.
- Ask the user to enter the second number.
- Determine the selection.
- Based on the choice, perform the calculation.
- If dividing, check to make sure there is no divide by zero error.
- Output the result.