home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tyc / list6_2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-16  |  395 b   |  23 lines

  1.    /* Demonstrates nesting two for statements */
  2.    
  3.    #include <stdio.h>
  4.    
  5.    void draw_box( int row, int column);
  6.  
  7.    main()
  8.    {
  9.        draw_box( 8, 35 );
  10.   }
  11.  
  12.   void draw_box( int row, int column )
  13.   {
  14.       int col;
  15.       for( ; row > 0; row-- )
  16.       {
  17.           for(col = column; col > 0; col-- )
  18.               printf( "X" );
  19.  
  20.           printf( "\n" );
  21.       }
  22. }
  23.