home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / languages / progs / ctutor / Examples / simpleio < prev    next >
Encoding:
Text File  |  1990-10-01  |  362 b   |  16 lines

  1. #include "stdio.h"    /* standard header for input/output */
  2.  
  3. main()
  4. {
  5. char c;
  6.  
  7.    printf("Enter any characters, X = halt program.\n");
  8.  
  9.    do {
  10.       c = getchar();    /* get a single character from the kb */
  11.       putchar(c);       /* display the character on the monitor */
  12.    } while (c != 'X');  /* until an X is hit */
  13.  
  14.    printf("\nEnd of program.\n");
  15. }
  16.