Reza
2018-01-22 11:36:21 UTC
This is how it works;
User has 60 seconds to answer unlimited questiones and just after a minute program stops and gives result.
But how to make it sensitive on time?
Here is a part of code:
int n = 0 , res;
clock_t start = clock() , end;
do{
puts (question [n]);
cin >> answer;
check_ans ();
res = check_time();
n++;
}while (res)
Which check_ans function checks answer and check_time checkes spent time and returns 0 if spent time is lees than 60 seconds.
So how to run check_time continuously during program?