|
@ -60,6 +60,14 @@ void timequiz() { |
|
|
while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) { |
|
|
while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) { |
|
|
int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); |
|
|
int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); |
|
|
askedQuestions[questionIndex] = 1; |
|
|
askedQuestions[questionIndex] = 1; |
|
|
|
|
|
|
|
|
|
|
|
int correctIndex = correctAnswers[questionIndex] - 1; |
|
|
|
|
|
|
|
|
|
|
|
displayQuestion(questions[questionIndex], answers[questionIndex], correctIndex); |
|
|
|
|
|
|
|
|
|
|
|
int userAnswer; |
|
|
|
|
|
printf("Answer (1-4): "); |
|
|
|
|
|
scanf_s("%d", &userAnswer); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|