Question
4.19 Calculator write a program that displays the following manual for the user to chose among calculations Please select one of the following: addition subtraction
4.19 Calculator
write a program that displays the following manual for the user to chose among calculations
Please select one of the following:
- addition
- subtraction
- multiplication
- division
- exit
The program will then read in the user entry.
when the user chose "1", it will ask the user "Please enter two numbers separated by space:", read these two numbers into variables, add them and display the sum; when the user chose "2", it will ask the user "Please enter two numbers separated by space:", read these two numbers into variables, subtract the 2nd number from the first one and display the result; when the user chose "3", it will ask the user "Please enter two numbers separated by space:", read these two numbers into variables, multiply them and display the product; when the user chose "4", it will ask the user "Please enter two numbers separated by space:", read these two numbers into variables, divide the first number by the 2nd number, and display the quotient; when the user chose "5", exit the program; when what the user entered is not within the range of 1~5, display "This is Not a valid choice."
Can this be done in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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