home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / GENCSRC.ZIP / SIMPLEIO.C < prev    next >
C/C++ Source or Header  |  1987-11-21  |  472b  |  17 lines

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