Continue Example
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
for(int i=0;i<5;i++)
{
if(i==3)
{
cout<< "Value 3 is omitted" << endl;
continue; /* Continues with the next iteration. */
}
else
cout<< "Value = " << i << endl;
}
return 0;
}
Output:
Value = 0
Value = 1
Value = 2
Value 3 is omitted
Value = 4