home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap05 / if.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-05  |  279 b   |  11 lines

  1. /* if.c -- simple IF statement */
  2.  
  3. char ch;
  4. main()
  5. {
  6.     printf("Do you want to continue y/n? "); /* prompt */
  7.     if (ch = getche() == 'y')
  8.         printf("\nLet's continue ...\n");    /* if true */
  9.     printf("\nAll done.\n");                 /* always executed */
  10. }
  11.