Wednesday 25 March 2015

program for break

/*wap to printf a no from 1 to 5;and if if the value of number is
 3 then a controle is transferd outside of the loop*/

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=20;i++)
{
if(i==17)
{
break;}
printf("\n %d",i);   /*line will break at 3 */
}
getch();
 }

No comments:

Post a Comment