Advertisement
// C++ continue statement example
#include<iostream>
int main() // main method and program begins here
{
for(int i=0;i<5;i++)
{
if(i==3)
continue;
cout<<"i = " << i <<"\n";
}
cout<<"We are out of the loop");
return 0;
} // main method ends and so does the program
i = 0
i = 1
i = 2
i = 4
We are out of the loop
Advertisement
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement