Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

continue statement in c++ program

/*Q: Design a program to print the employee IDs from 1 to 15 and skip the
IDs 7 and 10 because they have resigned.*/
#include<iostream>
using namespace std;
int main()
{
	int meet=0;
	for(int i=1;i<=15;i++)
	{
		if(i==7||i==10)
			continue;
	cout<<"Employe ID="<<i<<endl;			
	}
}
Source by beginnersbook.com #
 
PREVIOUS NEXT
Tagged: #continue #statement #program
ADD COMMENT
Topic
Name
9+7 =