QUESTION 1 Sketch a flowchart for a program that will perform like a calculator involving operators add, subtract, multiply and divide: a. Prompt the users to enter desired operator of char type (add, subtract, multiply and divide) b. Prompt the users to enter two inputs of numbers c. Use switch-case statements to check the entered input i. If the user enters +, addition is performed on the numbers. ii. If the user enters -, subtraction is performed on the numbers. iii. If the user enters multiplication is performed on the numbers. iv. If the user enters /, division is performed on the numbers. v. If the user enters any other character, print out error message d. For the output, display >> the two numbers, the operator, the result. e. Loop using the Do-While until user decides to stop. QUESTION 2 Write a C++ program to prove the running of the solution.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 28PE
icon
Related questions
icon
Concept explainers
Question

Just answer it directly without explaining.

Thank You.

QUESTION 1
Sketch a flowchart for a program that will perform like a calculator involving operators add,
subtract, multiply and divide:
a. Prompt the users to enter desired operator of char type (add, subtract, multiply
and divide)
b. Prompt the users to enter two inputs of numbers
c. Use switch-case statements to check the entered input
i.
If the user enters +, addition is performed on the numbers.
ii.
If the user enters -, subtraction is performed on the numbers.
iii. If the user enters *, multiplication is performed on the numbers.
iv. If the user enters /, division is performed on the numbers.
v. If the user enters any other character, print out error message
For the output, display >> the two numbers, the operator, the result.
e. Loop using the Do-While until user decides to stop.
d.
QUESTION 2
Write a C++ program to prove the running of the solution.
Transcribed Image Text:QUESTION 1 Sketch a flowchart for a program that will perform like a calculator involving operators add, subtract, multiply and divide: a. Prompt the users to enter desired operator of char type (add, subtract, multiply and divide) b. Prompt the users to enter two inputs of numbers c. Use switch-case statements to check the entered input i. If the user enters +, addition is performed on the numbers. ii. If the user enters -, subtraction is performed on the numbers. iii. If the user enters *, multiplication is performed on the numbers. iv. If the user enters /, division is performed on the numbers. v. If the user enters any other character, print out error message For the output, display >> the two numbers, the operator, the result. e. Loop using the Do-While until user decides to stop. d. QUESTION 2 Write a C++ program to prove the running of the solution.
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Operators
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr