Continue Statement in c++




This video tutorial explains the continue statement in c++.
You will learn how to skip the statements in loops using continue statement along with the working of continue  in for and while and do while loops in detail with examples.

source code for this tutorial

#include <iostream>

using namespace std;

int main()
{
    int counter = 1;

    while( counter <= 10){

        if(counter == 5){
            counter++;
            continue;
        }
        cout << counter << endl;
        counter++;

    }
   return 0;
}

 
Back To Top