program to use break statement in c language
#include<stdio.h>
int main()
{
int n;
for(n=1; n<=5; n++)
{
if(n==3)
break;
printf("number=%d\n",n);
}
printf("out of for loop\n");
return 0;
}
output
number=1
number=2
out of for loop