/* --------------------------------------------------------------------- // Figure 3.13: Countdown. // Fill the screen with 20 numbered lines. // --------------------------------------------------------------------- */ #include #define ITERATIONS 20 void main( void ) { int m; /* The loop counter. */ puts( " This is a heading line." ); m = ITERATIONS; /* Initialize the loop counter. */ while (m > 0) { /* Count downward from 20 to 1. */ printf( " %i. \n", m ); /* Print the counter. */ m = m - 1; /* Decrement the counter. */ } puts( "\n This message should appear after a blank line." ); puts( " Normal termination." ); }