¶
한 ,
함 하 .
하 ..;
한 한 해 .
kbhit() 함 , 키 1, 0 한 .

하 ..;
한 한 해 .
kbhit() 함 , 키 1, 0 한 .
, . . 8 !! ㅋㅋㅋ
! ㅋㅋ
¶
~cpp #include <stdio.h> #include <conio.h> #include <time.h> void main() { time_t record = 8; time_t start_t; start_t = time(0); printf("wait 8 seconds...\n"); printf("and press any key exactly..."); for( ; ; ) { if (kbhit()){ if(start_t - record == 0) { printf("You win !!\n"); }else{ printf("your time is off."); } break; } } getch(); }
. 8 ㅠ .
↓↓
↓↓
~cpp #include <stdio.h> #include <conio.h> #include <time.h> void main() { time_t record = 8; time_t start_t; start_t = time(0); printf("wait 8 seconds...\n"); printf("and press any key exactly..."); for( ; ; ) { if (kbhit()){ if(time(0) - start_t == record) { printf("You win !!\n"); }else{ printf("your time is off."); } break; } } getch(); }! ㅎ
한테 할 ¶
~cpp #include <stdio.h> #include <conio.h> #include <time.h> void main() { time_t record = 8; time_t start_t; start_t = time(0); printf("wait 8 seconds...\n"); printf("and press any key exactly..."); for( ; ; ) { if (kbhit()){ if(time(0)-start_t == record-1 ) // 한 { printf("You win !!\n"); }else{ printf("your time is off."); } break; } } getch(); }
화한 ..^^
한 .^^
time(0) 트 하 (time(0)-start_t ),
record하 9( 0^^) -1 .
한 .^^
time(0) 트 하 (time(0)-start_t ),
record하 9( 0^^) -1 .