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