From 5735fc3a515c1232299ad6791b889885d71bd155 Mon Sep 17 00:00:00 2001 From: Pascal Schneider Date: Mon, 5 Feb 2024 23:46:43 +0100 Subject: [PATCH] =?UTF-8?q?While-Schleife=20f=C3=BCr=20Spiel=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/timequiz.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/timequiz.c b/src/timequiz.c index 7ff9158..ef48761 100644 --- a/src/timequiz.c +++ b/src/timequiz.c @@ -60,6 +60,14 @@ void timequiz() { while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) { int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); askedQuestions[questionIndex] = 1; + + int correctIndex = correctAnswers[questionIndex] - 1; + + displayQuestion(questions[questionIndex], answers[questionIndex], correctIndex); + + int userAnswer; + printf("Answer (1-4): "); + scanf_s("%d", &userAnswer); } }