+ 1
Continue statement
Hello I didn’t quiet understand how does this statement works I found multiple pages on the web describing the statement but i need to see example how people use this statement in programing Any one could send me some links to some codes that use this statement Regards
2 Réponses
+ 6
its very easy :
continue statement ignores the current state up to next state if you have 1-10 numbers and you want iteration on loop just u don't want to print 7 what u will do?
solution :
for (int i =1 ; i <=10 ; i ++) {
if(i == 7)
continue ;
cout<<i;
}
output :
1 2 3 4 5 6 8 9 10