0
What is different between break and continuous conditions?
2 Answers
+ 2
for(int i = 0; i < 5; i++){
if(i == 3)
continue;
printf(i) ;
}
output:
0
1
2
4
for(int i = 0; i < 5; i++){
if(i == 3)
break;
printf(i) ;
}
output:
0
1
2
"continue skips the loop, while break breaks the loop."
PLEASE SEARCH BEFORE POSTING YOUR QUESTIONS NEXT TIME.
https://www.sololearn.com/discuss/146640/?ref=app
https://www.sololearn.com/discuss/1667598/?ref=app
https://www.sololearn.com/discuss/1048680/?ref=app
https://www.sololearn.com/discuss/1623411/?ref=app
https://www.sololearn.com/discuss/234350/?ref=app
https://www.sololearn.com/discuss/2275580/?ref=app
+ 1
"continue" condition skip 3 and continue printf() function
"break" condition will stop when i=3 , not print.