home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc / qc25 / breaker.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-15  |  310 b   |  20 lines

  1. /* BREAKER.C: Demonstrate break statement. */
  2.  
  3. #include <stdio.h>
  4. #include <conio.h>
  5.  
  6. main()
  7. {
  8.    char ch;
  9.    printf( "Press any key. Press Tab to quit.\n" );
  10.    while( 1 )
  11.    {
  12.       ch = getche();
  13.       if( ch == '\t' )
  14.       {
  15.      printf( "\a\nYou pressed Tab\n" );
  16.      break;
  17.       }
  18.    }
  19. }
  20.