From ac5c8ea1171f8c9973ab01995cceb59d9a622a0c Mon Sep 17 00:00:00 2001 From: Pascal Schneider Date: Tue, 6 Feb 2024 00:32:32 +0100 Subject: [PATCH] =?UTF-8?q?Funktion=20f=C3=BCr=20ung=C3=BCltige=20Eingabe?= =?UTF-8?q?=20Struktur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/timequiz.c | 5 +++++ src/timequiz.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/timequiz.c b/src/timequiz.c index c5edcd0..b7c29e9 100644 --- a/src/timequiz.c +++ b/src/timequiz.c @@ -12,6 +12,8 @@ void displayQuestion(char* question, char* answers[], int correctIndex); void processUserAnswer(int userAnswer, int correctIndex, int* score, int* totalCorrectAnswers, char* answers[]); +int isValidAnswer(int userAnswer); + void timequiz() { printf("Welcome to our Time Quiz!\n"); @@ -187,3 +189,6 @@ void processUserAnswer(int userAnswer, int correctIndex, int* score, int* totalC printf("Wrong! The correct answer is: %d. %s\n", correctIndex + 1, answers[correctIndex]); } } + +int isValidAnswer(int userAnswer) { +} diff --git a/src/timequiz.h b/src/timequiz.h index 89d7376..9803ee9 100644 --- a/src/timequiz.h +++ b/src/timequiz.h @@ -5,5 +5,6 @@ void timequiz(); int getRandomQuestionIndex(int askedQuestions[], int totalQuestions); void displayQuestion(char* question, char* answers[], int correctIndex); void processUserAnswer(int userAnswer, int correctIndex, int* score, int* totalCorrectAnswers, char* answers[]); +int isValidAnswer(int userAnswer); #endif //ende TIMEQUIZ_H