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