break and continue statements : continue « Operators statements « C++ Tutorial






#include <iostream>

using namespace std;

int main()
{
    int count = 0;
    while (true)
    {
        count += 1;

        //end loop if count is greater than 10
        if (count > 10)
             break;

        //skip the number 5
        if (count == 5)
             continue;

        cout << count << endl;
    }
    return 0;
}








3.19.continue
3.19.1.Using the continue statement with do while loop
3.19.2.Set up 3 stop conditions for the loop: break and continue
3.19.3.break and continue statements