home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c025 / 1.ddi / LPUTC.C < prev    next >
Encoding:
Text File  |  1985-02-17  |  280 b   |  12 lines

  1. main()    /* lputc.c  -- typewriter program using lputc.c */
  2.  
  3. {
  4.     int c;
  5.  
  6.     puts("I'm a typewriter. When you want to stop,");
  7.     puts("press <Ctrl-z>. Please type below:");
  8.     while((c = getchar()) != EOF)
  9.         lputc(c);
  10.     puts("Correct answer (on printer) is what you typed.");
  11. }
  12.