~cpp
#include <stdio.h>
#include <conio.h>
#include <time.h>
int main()
{
int last;
//게임 시작했을 때 시간 가져오기
last = time(0);
for(;;) {
//눌렀다!
if(kbhit())
{
// 지난 시간 == (time(0) - last)
if((time(0) - last)==8)
printf("you win!!! \n");
else
printf("your time is off. \n");
break;
}
}
getch();
return 0;
}