Question: Find the Syntax and Logic error in this code and fix it Version: 1.0 Lab Questions: 1.) The rote of the conpilen is... 2.) The
Version: 1.0 Lab Questions: 1.) The rote of the conpilen is... 2.) The syntas error in the pragran was. 3.) The logic error in the program uas... Hinclude using namespace atd; Int main() f double num1; double num2 double avg: cout "Enter two numbers" endl; cin num 1 num 2 ; avg = num 1+num2/2; cout "The average is " avg; return 0 ; 1. Try to compile your program. There sliould be a syntax error. piler should give some indication of where the error occurred. At correct the error and compile again. 2. Run the program several times, entering different values. Exn output carefully. Is it what you expect? There should be a logic e a bug. See if you cas correct it. 3. Test your program to make suiro it functions as you expect
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
