¶
.. . 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");
}










