Question: This code must be able to determine if the number/ counter that goes up to 100 is odd or even. Correct the error(s) in the
This code must be able to determine if the number/ counter that goes up to 100 is odd or even. Correct the error(s) in the following code. The errors may be syntax errors or logical errors. Write comments explaining what you changed, and how that impacts the program. int counter =0; while { counter >100} if (counter %2=1 ) cout counter " " is odd." endl; else cout counter " is odd." endl; ++counter; I/ same as: counter = counter +1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
