¶
..문는 . time녀 ..
런데.. 데 for를 는... while ..
뭔 for를 for 뽀대 만들 보 .^^;;;
리 문 . 마 는..1/1000는 ?? 1/100??
본 냥 1.ㅎㅎ 8-9 눌러만 면 .^^
런데.. 데 for를 는... while ..
뭔 for를 for 뽀대 만들 보 .^^;;;
리 문 . 마 는..1/1000는 ?? 1/100??
본 냥 1.ㅎㅎ 8-9 눌러만 면 .^^
¶
~cpp
#include <iostream>
#include <time.h>
#include <conio.h>
using namespace std;
const int ANSWER_TIME=8;
void main()
{
int second;
time_t before_time;
before_time=time(&before_time);
for (second=0; !kbhit(); ++second)
{
time_t now_time;
time(&now_time);
while(now_time==before_time)
{
time(&now_time);
}
time(&before_time);
}
if (second==ANSWER_TIME-1)
cout << "you win!!!";
else
cout << "your time is off." << second;
system("PAUSE");
}










