home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
c
/
other
/
learn
/
if1.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1988-10-07
|
253 b
|
15 lines
/* IF.C: Demonstrate if statement. */
#include <stdio.h>
#include <conio.h>
#define B_KEY 'b'
main()
{
char ch;
printf( "Press the b key to hear a bell.\n" );
ch = getche();
if( ch == B_KEY )
printf( "Beep!\a\n" );
}