Looping | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Looping

BUG BUSTERS: What is wrong with this code? int counter = 0; while (counter < 10) { cout << ā€œcounter: ā€œ << counter; }

10th Nov 2016, 3:11 PM
Rabbi Sarpong
1 Resposta
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!
10th Nov 2016, 3:48 PM
XiA
XiA - avatar