create a new file in c++. In this lab, you will add some more functionality to the program. Use loops to keep running the program until the user chooses the exit condition (X or x). When dividing, use a loop to validate user input, making sure the denominator (second number) is not zero. If the user enters a 0 for the second number, display an error message and ask them again. A) Add two numbersB) Subtract two numbersC) Multiply two numbersD) Divide two numbersX) Exit program The program should: display a "hello" message before presenting the menu display the menu prompt user for selection accept either uppercase or lowercase for selection display error message if invalid selection is made (example: E) display the selection back to the user prompt for two numbers perform the operation and display the results use loop for input validation of second number during division display error message for division when second number is 0 after displaying result, use loop to present menu again and ask for another selection do not display "hello" message again display a "goodbye" message before exiting the program
create a new file in c++. In this lab, you will add some more functionality to the program. Use loops to keep running the program until the user chooses the exit condition (X or x). When dividing, use a loop to validate user input, making sure the denominator (second number) is not zero. If the user enters a 0 for the second number, display an error message and ask them again. A) Add two numbersB) Subtract two numbersC) Multiply two numbersD) Divide two numbersX) Exit program The program should: display a "hello" message before presenting the menu display the menu prompt user for selection accept either uppercase or lowercase for selection display error message if invalid selection is made (example: E) display the selection back to the user prompt for two numbers perform the operation and display the results use loop for input validation of second number during division display error message for division when second number is 0 after displaying result, use loop to present menu again and ask for another selection do not display "hello" message again display a "goodbye" message before exiting the program
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
create a new file in c++.
In this lab, you will add some more functionality to the
A) Add two numbers
B) Subtract two numbers
C) Multiply two numbers
D) Divide two numbers
X) Exit program
The program should:
- display a "hello" message before presenting the menu
- display the menu
- prompt user for selection
- accept either uppercase or lowercase for selection
- display error message if invalid selection is made (example: E)
- display the selection back to the user
- prompt for two numbers
- perform the operation and display the results
- use loop for input validation of second number during division
- display error message for division when second number is 0
- after displaying result, use loop to present menu again and ask for another selection
- do not display "hello" message again
- display a "goodbye" message before exiting the program
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education