Question
Write a C# (console) program to create an interface that acts as a simple two number calculator. Your program should continue doing calculations until it
Write a C# (console) program to create an interface that acts as a simple two number calculator. Your program should continue doing calculations until it is closed or exited. [2 Marks] Instead of a GUI keypad, this calculator will use console input to accept the two numbers to be used in the calculation. This calculator needs to prompt the user for ONE selection of any of these simple math operators: plus, minus, multiply, or divide. Three (3) inputs will need to be prompted: one for the selected mathematical operation, one for the first input, and one for the second input. The output will be displayed when the mathematical operation is known and the two inputs (numbers) are entered. The output will not be editable by the user. After the calculation is executed, the application will display error messages (or other status message), and can be as you deem appropriate. [4 marks] This calculator will handle all errors using try/catch statements. The error message output should display at least 3 different types of error (or status) messages, depending on what the user has done incorrectly. Your program should be able to catch all possible errors the user may do, it should not crash. [6 marks]
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