1
0

lethead1.c 555 B

12345678910111213141516171819202122232425262728
  1. /* lethead1.c */
  2. #include <stdio.h>
  3. #define NAME "GIGATHINK, INC."
  4. #define ADDRESS "101 Megabuck Plaza"
  5. #define PLACE "Megapolis, CA 94904"
  6. #define WIDTH 40
  7. void starbar(void); /* prototype the function */
  8. int main(void)
  9. {
  10. starbar();
  11. printf("%s\n", NAME);
  12. printf("%s\n", ADDRESS);
  13. printf("%s\n", PLACE);
  14. starbar(); /* use the function */
  15. return 0;
  16. }
  17. void starbar(void) /* define the function */
  18. {
  19. int count;
  20. for (count = 1; count <= WIDTH; count++)
  21. putchar('*');
  22. putchar('\n');
  23. }