감 ¶
각보다는 게 딩 것 같데 ,
모르는 를 보는데 루나 렸다.
그냥 딩 려다 보까 ..;
란 다 봐 단 명뿐 못 다.
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 붙.