home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 100 / 90 / ctutor2b.arc / SINGLEIO.C < prev    next >
C/C++ Source or Header  |  1987-11-21  |  377b  |  17 lines

  1.                                          /* Chapter 9 - Program 2 */
  2. #include <stdio.h>
  3.  
  4. main()
  5. {
  6. char c;
  7.  
  8.    printf("Enter any characters, terminate program with X\n");
  9.  
  10.    do {
  11.       c = getch();                     /* get a character */
  12.       putchar(c);                  /* display the hit key */
  13.    } while (c != 'X');
  14.  
  15.    printf("\nEnd of program.\n");
  16. }
  17.