U E D R , A S I H C RSS

시간맞추기/조현태

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

한테 할

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:17
Processing time 0.0109 sec