C++ Continue Statement

When we want to take the control to the beginning of the loop, bypassing the statement inside the loop, statement not yet executed, the keyword continue allows us to do this.

Example of C++ Continue Statement :-

 

#include<conio.h>
#include<iostream.h>
void main()
{
int a=10;
clrscr();
while(a>0)
{
cout<<a<<endl;
if(a%2==0)
cout<<“\n”;
a–;
}
getch();
}

 

Result of C++ Continue Statement  :- 

Continue Example in C++




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top