Question: (simple_caculator.cpp) Write a C++ program that asks the user to enter two integers and an arithmetic operator (+,-, *,7). Then based on the operator, the

 (simple_caculator.cpp) Write a C++ program that asks the user to enter

(simple_caculator.cpp) Write a C++ program that asks the user to enter two integers and an arithmetic operator (+,-, *,7). Then based on the operator, the program calculates the result. The program checks input for invalid operators. It also checks for division by O. Here are sample runs: Enter two integers: 4 8 Enter an arithmetic operator (+, -, *, /): + Result = 4 + 8 = 12 Enter two integers: 4 8 Enter an arithmetic operator (+, -, *, /): $ Invalid operator. Enter two integers: 40 Enter an arithmetic operator (+, -, *, /): / Cannot divide by 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!