home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 98.img / LCNOW2.ZIP / EXAMPLES / BANNER.C < prev    next >
C/C++ Source or Header  |  1988-05-20  |  499b  |  40 lines

  1. /*
  2.  * B A N N E R
  3.  *
  4.  * Print a message surrounded by a border. Use
  5.  * functions to draw the elements of the border.
  6.  */
  7.  
  8. #include <stdio.h>
  9.  
  10. #define WIDTH   72
  11. #define ROWS    4
  12.  
  13. Line()
  14. {
  15.     int x;
  16.  
  17.     for (x = 0; x <= WIDTH; ++x)
  18.         putchar('*');
  19.     putchar('\n');
  20. }
  21.  
  22. Sides()
  23. {
  24.     int y;
  25.  
  26.     for (y = 0; y <= ROWS; ++y)
  27.         printf("*\t\t\t\t\t\t\t\t\t*\n");
  28. }
  29.  
  30. main()
  31. {
  32.     Line();
  33.     Sides();
  34.     printf("*\t\t\t    (your ad here)\t\t\t\t*\n");
  35.     Sides();
  36.     Line();
  37.  
  38.     return 0;
  39. }
  40.