20 lines
314 B
C
20 lines
314 B
C
/*
|
|
* This program loops until a key is pressed
|
|
* or a count is exceeded.
|
|
*/
|
|
#include <stdio.h>
|
|
#include <conio.h>
|
|
|
|
void main()
|
|
{
|
|
unsigned long i;
|
|
|
|
printf( "Program looping. Press any key.\n" );
|
|
for( i = 0; i < 10000; i++ ) {
|
|
if( kbhit() ) {
|
|
getch();
|
|
break;
|
|
}
|
|
}
|
|
}
|