Code for Program to illustrate the use of the continue statement in C++ Programming
#include<iostream.h>
#include<conio.h>
/*************************************************************************//*************************************************************************///----------------------------- Main( ) -------------------------------///*************************************************************************//*************************************************************************/
main()
{
clrscr();
cout<<"\n ******** Continue Statement *********"<<endl;
int flag;
for(int count=1;count<=10;count++)
{
if(count==5)
{
flag=count;
continue;
}
cout<<" "<<count;
}
cout<<"\n\n Countinue occured at flag = "<<flag<<endl;
getch();
return 0;
}
No comments:
Post a Comment