Write a C++ program to perform the same. Your program should be able to sum, subtract, divide and multiply. User should be allowed to enter three numbers

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 30PE
icon
Related questions
Question

Calculator is used for making mathematical calculations, in particular a small electronic device with a keyboard and a visual display. Normally, user enter the numbers and mathematical operator in between, calculator identifies from the sign that what to perform. E.g.

User Enters: 8 / 2 Answer is 4

Calculator performs division by identifying the operator in between the numbers.

Write a C++ program to perform the same. Your program should be able to sum, subtract, divide and multiply.

User should be allowed to enter three numbers

 

Sample Output:

Enter your expression: 5 + 67 + 2

Sum Answer:  74

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
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