Question: need help finishing this code! please help and zoom in if needed! Write a program that reads in a simple mathematical expression consisting of a

need help finishing this code! please help and zoom in if needed!

need help finishing this code! please help and zoom in if needed!

Write a program that reads in a simple mathematical expression consisting of

a floating point operand, a binary operator, and another floating point operand.

Write a program that reads in a simple mathematical expression consisting of a floating point operand, a binary operator, and another floating point operand. For example, 62.1 + 5 is valid input. Your program should calculate the result of the mathematical operation. Accept the following mathematical operators and perform the applicable mathematical operation: + (performs addition) = (performs subtraction) X, x, and = (performs multiplication) 7 (performs division) Incorporate the use of a switch statement. Use a character variable for the binary operator. Use the following table for sample input and output Sample Input Sample Output 62.1 + 5 62.1 + 5 = 67.1 29.9 - 31.5 29.9 - 31.5 = -1.6 3.9 X 2 3.9 x 2 = 7.8 -9 z 5 - 9 x 5 = 45 7 * 8 7 8 = 56 5 / 2 5 / 2 = 2.5 5 ? 2 Invalid symbol 5 #include > numi >> symbol >> num2; 15 switch (symbol) 17 18 case cout

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!