Question
Create an IPO chart, flowchart, pseudocode algorithm and desk check for a simple calculator program. This program repeatedly asks the user to select between options
Create an IPO chart, flowchart, pseudocode algorithm and desk check for a simple calculator program. This program repeatedly asks the user to select between options to add, subtract, multiply, divide or exit, then prompts for two numbers, carries out and displays the result of the operation, and then presents the user with the options again until the user chooses to exit. The program should include appropriate error checking to prevent the program from dividing by zero.
SAMPLE PROGRAM EXECUTION (user input is shown in blue for reference)
Select 1 to add, 2 to subtract, 3 to multiply, 4 to divide or any other number to exit: 1
Enter two numbers: 30 45
30 + 45 = 75
Select 1 to add, 2 to subtract, 3 to multiply, 4 to divide or any other number to exit: 4
Enter two numbers: 120 0
Error: Cannot divide by zero
Select 1 to add, 2 to subtract, 3 to multiply, 4 to divide or any other number to exit: 4
Enter two numbers: 120 10
120 / 10 = 12
Select 1 to add, 2 to subtract, 3 to multiply, 4 to divide or any other number to exit: 3
Enter two numbers: 6 12
6 x 12 = 72
Select 1 to add, 2 to subtract, 3 to multiply, 4 to divide or any other number to exit: 0
***END OF PROGRAM***
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started