Answered step by step
Verified Expert Solution
Question
1 Approved Answer
**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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started