0
Looping
BUG BUSTERS: What is wrong with this code? int counter = 0; while (counter < 10) { cout << âcounter: â << counter; }
1 Answer
+ 1
0
You don`t have "counter" to increment and then your code will be infinite loop.
Correct Answer :
int counter = 0;
while (counter < 10)
{
cout << âcounter: â << counter;
counter++;
}
Hope to help you!