c++ continue statement
c++ continue statement In this tutorial, we will learn about the continue statement in cpp language and it's usage in loop programming. In computer programming, the continue statement to break the execution in the loop and give control to the initial part of the loop. The syntax of the continue statement. continue; Before learning the continue statement, kindly go through the loops => while loop => do while loop => for loop how continue statement work? Example: #include<iostream> using namespace std; int main() { for(int num =0;num <=5;num++) { //if loop counter reach at value of 3 //then skip the lower part of the loop and //return to top of loop for next //iteration if(num ==3) { continue; //if num=3 then loop continue,return to the top of loop } cout<< num <<endl; } return 0; } Output 0 1 2 4 5 In the above example, the loop normally works until the condition meets counter=3. If counter=3