¶
보는 딩 데 ,
모르는 를 보는데 루 .
냥 딩 보 ..;
란 봐 명뿐 못 .
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 붙.
- .. 9 리는.. ㅎㅎ ~ 마 내 보 냐










