Page 62 - 6437
P. 62

If the condition is true, the flow of control jumps back up to do, and the statement(s) in
                   the loop executes again. This process repeats until the given condition becomes false.

                          Flow Diagram

































                          Example

                 #include <stdio.h>


                 int main ()
                 {

                    /* local variable definition */
                    int a = 10;


                    /* do loop execution */

                    do
                    {

                         printf("value of a: %d\n", a);
                         a = a + 1;

                    }while( a < 20 );


                    return 0;







                                                                                                      64
   57   58   59   60   61   62   63   64   65   66   67