0

How to write loop statement

terminate infinite loop

9th Apr 2017, 6:12 AM
Suraj Kadam
Suraj Kadam - avatar
1 Answer
+ 3
you can use break; to terminate loops. For example: for (int i = 1; i < 999; i ++){ cout << i; if (i == 10){ break; } }
9th Apr 2017, 6:16 AM
Wen Qin
Wen Qin - avatar