Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code should be in C++ Write a program that lets the user perform arithmetic operations. First ask the user for a first double number. Then
Code should be in C++
Write a program that lets the user perform arithmetic operations. First ask the user for a first double number. Then use a while loop to do the following: 1. The user selects between the four arithmetic operations: add, subtract, multiply and divide. This can be done using a menu system (see output below). Remember to put a 'quit' option in the menu so that the user can quit the program. Also, check to make sure the user has chosen a valid choice and re-prompt the user for another choice (see output below) 2. Then ask the user for a second double number. 3. Print the results of the operation of the first with the second number. NOTE: Use the results of the previous operation to be the first number for the current operation. So don't re-ask the user for the first number after the first operation. EXAMPLE PROGRAM RUN 1 (user input is underlined) ===ADDING MACHING=== Enter First Number: 2.5Step 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