Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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:

  1. addition
  2. subtraction
  3. multiplication
  4. division
  5. 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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions