What is loop statement

   Loop statement
                 Loop is a mechanism that allows use to do the task again and again by writing once!

 Type of loop
 There are three types of  loop

: For loop (simple )
:While loop
: Do while loop.     



 Simple loop statement fo

     Void main ( )
{

 Int.     I;

   For( I=1; I<=5; I++)
{
 Printf("%d",n)
}
 Getch( );
}


Then out will be come  12345





Similerly
 break statement


Void main ( )
{
  Int. I; no
 For ( I=1; I<=5; I++)
{
If (n==3)
Breaks
Printf("%d",I)
}
Getch( );
}
 
    Printf("%d",

Comments

Popular Posts