home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
qc_prog
/
chap13
/
getche.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-04-07
|
334 b
|
12 lines
/* getche.c -- using getche() */
#include <conio.h> /* note different file included */
main()
{
int count = 1;
printf("Please enter a word.\n");
while (getche() != '\r') /* changed comparison */
printf("%d.. ", count++);
printf("\n%d characters altogether\n", count - 1);
}