home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / EXAMPLES.ZIP / INTRO22.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  377 b   |  22 lines

  1. /* INTRO22.C--Example from Chapter 4 of Getting Started */
  2.  
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <conio.h>
  6.  
  7. int main()
  8. {
  9.    int pos;
  10.    char text [40];
  11.  
  12.    printf("Type 'end' to quit\n");
  13.  
  14.    while (strcmp (gets(text), "end") != 0) {
  15.       for (pos = 1; pos <= strlen(text); pos++)
  16.          putch('-');
  17.       printf("\n");
  18.    }
  19.  
  20.    return 0;
  21. }
  22.