/* INTRO22.C--Example from Chapter 4 of Getting Started */ #include #include #include int main() { int pos; char text [40]; printf("Type 'end' to quit\n"); while (strcmp (gets(text), "end") != 0) { for (pos = 1; pos <= strlen(text); pos++) putch('-'); printf("\n"); } return 0; }