Saturday, 31 December 2011

The do…while Repetition Statement

  • Example (letting counter = 1):
      • do {
        • printf( "%d ", counter );
      • } while (++counter <= 10);
    • Prints the integers from 1 to 10
Flowchart of the do…while repetition statement

example...

result...



No comments:

Post a Comment