Question: please help ASAP. my code has a tiny error I can't find! 5.2 Lab 27: Repetition of Mathematical Expression In Lab 25, you were required

please help ASAP. my code has a tiny error I can't find!

please help ASAP. my code has a tiny error I can't find!

5.2 Lab 27: Repetition of Mathematical Expression In Lab 25, you were

required to write a program that computed the result of a simple

mathematical expression consisting of a floating point operand, an operator, and another

5.2 Lab 27: Repetition of Mathematical Expression In Lab 25, you were required to write a program that computed the result of a simple mathematical expression consisting of a floating point operand, an operator, and another floating point operand. This assignment requires you to modify that program so that it will continue to repeat until both operands contain a zero. For example, o + o should terminate your program. When the input is as shown in Figure 1, your program should produce the output as shown in Figure 2. Figure 1: (sample input) -5 + 5 -5 - 5 Figure 2 (sample output) -1.1 + 0 = 0 3.27 / 9 = 0.363333 4 x 8.1 = 32.4 7 X 9.95 = 69.65 -5 + 5 = -10 -5--5 = 0 4 5 #include 6 #include 7 8 using namespace std; 9 int main() 10 { 11 //define variables 12 double numi, num2; 13 char symbol; 14 15 cin >> numi >> symbol >> num2; 17 while (numi != 0 && num2 = e) 18 19 switch (symbol) 2e 21 case: cout >numi >> symbol >> num2; //read in values 43} 44 45 return 0; 46 47 } 23 -5.25 7.9 +0 3125.5 105.4 6 3 X 3 Input 7 / 9 15 - 2.5 2317 + 43 0 0 Your output 3 + 2 = 5 -5 - -5.25 = 0.25 -5 - -5.25 = 0 25 7.9 + 0 = 02 B125.5, 105.4 = 29. 653 72 0 x 6 = 02 Expected output 3 x 3 = ge Invalid symbole 7 / 9 = 0.7777782 15 - 2.5 = 12.52 2017 + 43 = 28602 1.75 + 5 = 8.7 8 / 7 4 X 3 3.1 + 9 100 X 1000 3.3 + 2.21 Input 75 - 231.456 6 ? 4 3.3 / 1.1 97.01 X1 00 Your output 8 7 = 1.14286 4 x B = 12 3.1 * 9 = 27.9 100 x 100 = 100000 3.3 + 2.21 = 5.51 75 - 231.456 =: -156.456 Invalid symbol 3.3 / 1.1 = 3 97.01 X 1 = 97.01

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!