Question: Write a program named Lab11C in C++ that will act as a calculator, allowing the user to type in an equation and calculating the result.

Write a program named Lab11C in C++ that will act as a calculator, allowing the user to type in an equation and calculating the result. a. Ask the user to enter 2 integers with a character between them, all separated by spaces. The character should be +,,,l, or % b. Input the 2 numbers and the character oper. (oper will be the operator, but we can't use operator as a variable name because it's a reserved word.) c. Write a switch statement based on oper, that will perform the mathematical operation on the numbers. d. Print the whole equation with the result in the following format: If the user types in 40/5, then the output should be: 40/5=8 (You have worked with output statements enough that you should be able to do this.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
