Page 67 - 6437
P. 67

Example

                 #include <stdio.h>


                 int main ()

                 {
                    /* local variable definition */

                    int a = 10;


                    /* while loop execution */
                    while( a < 20 )

                    {
                        printf("value of a: %d\n", a);

                        a++;
                        if( a > 15)

                        {
                            /* terminate the loop using break statement */

                             break;
                        }

                    }





                                                                                                      69
   62   63   64   65   66   67   68   69   70   71   72