|
@ -153,6 +153,11 @@ void timequiz() { |
|
|
printf("Answer (1-4): "); |
|
|
printf("Answer (1-4): "); |
|
|
scanf_s("%d", &userAnswer); |
|
|
scanf_s("%d", &userAnswer); |
|
|
|
|
|
|
|
|
|
|
|
while (!isValidAnswer(userAnswer)) { |
|
|
|
|
|
printf("Invalid input. Please enter a number between 1 and 4: "); |
|
|
|
|
|
scanf_s("%d", &userAnswer); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
processUserAnswer(userAnswer, correctIndex, &score, &totalCorrectAnswers, answers[questionIndex]); |
|
|
processUserAnswer(userAnswer, correctIndex, &score, &totalCorrectAnswers, answers[questionIndex]); |
|
|
|
|
|
|
|
|
totalAnsweredQuestions++; |
|
|
totalAnsweredQuestions++; |
|
|