Question: **Please use C++ Language** 3. (5 points) Write a program that evaluates a simple expression of the form value1 operator value2 taken from the user,

 **Please use C++ Language** 3. (5 points) Write a program that

**Please use C++ Language**

3. (5 points) Write a program that evaluates a simple expression of the form value1 operator value2 taken from the user, where the operator could be +,-,*,/,%. A sample run is: Type in a simple expression: 2.3 + 4.5 [Enter] 6.8 Make sure that your program doesn't allow division by zero and displays an appropriate message. (HINT: There are three inputs from the user and read them using cin value! operator value2. Read the middle input (operator) in a char variable and use either switch or if - else if statements.)

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!