Question: Step 1: Remove tryIt3A.cpp from the project and add the findErrors.cpp program in your Lab3 folder to the project. Here is a copy of the

Step 1: Remove tryIt3A.cpp from the project and add the findErrors.cpp program in your Lab3 folder to the project. Here is a copy of the source code.

1 // Lab 3 findErrors.cpp 2 // This program contains many syntax errors and will not compile. 3 // Fix the errors so that it correctly finds the average of the 4 // two integers the user enters. 5 // PUT YOUR NAME HERE. 6 7 #include 8 using namespace std; 9 10 int main 11 Int num1, num2, 12 double average; 13 14 // Input 2 integers 15 Cout << "Enter two integers separated by one or more spaces: "; 16 Cin << num1, num2; 17 18 Find and display their average 19 (num1 + num2) / 2 = average;

20 21 Cout << " The average of these 2 numbers is " << average << "endl"; 22 23 return 0;

Step 2: Find and correct all the syntax errors so that the program compiles and correctly finds the average of two entered integers.

Step 3: Once the program compiles with no errors, test it with the following data. If any answers are wrong, fix the logic error in the program and test it again.

Run 1: 6 8

Run 2: 0 -2

Run 3: 7 8

Step 4: If your professor asks you to do so, print the final, corrected source code and output to hand in.

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!