home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap06 / dblbar.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-05  |  528 b   |  23 lines

  1. /* dblbar.c -- prints header using */
  2. /*             line() function     */
  3.  
  4. #define DOUBLE_BAR 205
  5.  
  6. main()
  7. {
  8.     void line();       /* declare line() function */
  9.  
  10.     line(10);          /* call line() function    */
  11.     printf("dblbar.c -- prints header using\n");
  12.     printf("line() function\n");
  13.     line(50);          /* call line() again       */
  14. }
  15.  
  16. void line()            /* function definition     */
  17. {
  18.     int pos;
  19.     for (pos = 1; pos <= 40; pos++)
  20.         putch(DOUBLE_BAR);
  21.     printf("\n");
  22. }
  23.