diff --git a/src/timequiz.c b/src/timequiz.c index 28f828b..9923be4 100644 --- a/src/timequiz.c +++ b/src/timequiz.c @@ -54,6 +54,11 @@ void timequiz() { memset(askedQuestions, 0, sizeof(askedQuestions)); srand((unsigned int)time(NULL)); + + while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) { + int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); + askedQuestions[questionIndex] = 1; + } } int getRandomQuestionIndex(int askedQuestions[], int totalQuestions) {