From 886f0ece6405a56146ae96c5986f1293c11431ff Mon Sep 17 00:00:00 2001 From: Florian Baeseler Date: Mon, 5 Feb 2024 20:13:04 +0100 Subject: [PATCH] =?UTF-8?q?=C3=9Cberpr=C3=BCfung=20der=20Eingabe=20in=20Sw?= =?UTF-8?q?itch=20mit=20wahr/falsch=20ausgabe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/test/results/test_casualQuiz.pass | 2 +- build/test/results/test_quizduell.pass | 2 +- build/test/results/test_timequiz.pass | 2 +- build/test/results/test_wwm.pass | 2 +- src/casualQuiz.c | 18 +++++++++++++----- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 3fa8184..1fa43bf 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.013744500000029802 +:time: 0.013265200017485768 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 38b27f6..f075711 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01369590000831522 +:time: 0.013494899991201237 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 8e182a5..f819020 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.012676399986958131 +:time: 0.012791300017852336 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index c0264ea..8adc593 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.013807800016365945 +:time: 0.013431600003968924 diff --git a/src/casualQuiz.c b/src/casualQuiz.c index 6f65e61..a8af63a 100644 --- a/src/casualQuiz.c +++ b/src/casualQuiz.c @@ -32,23 +32,31 @@ void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], in eingabe = FEingabeInteger(); switch(eingabe){ case 1:{ - printf("Case 1"); + printf("Case 1\n"); + if (richtige_antwort[i] == 4) printf("Right Answer, well done.\n"); + else printf("Wrong answer."); break; } case 2:{ - printf("Case 2"); + printf("Case 2\n"); + if (richtige_antwort[i] == 4) printf("Right Answer, well done.\n"); + else printf("Wrong answer."); break; } case 3:{ - printf("Case 3"); + printf("Case 3\n"); + if (richtige_antwort[i] == 4) printf("Right Answer, well done.\n"); + else printf("Wrong answer."); break; } case 4:{ - printf("Case 4"); + printf("Case 4\n"); + if (richtige_antwort[i] == 4) printf("Right Answer, well done.\n"); + else printf("Wrong answer."); break; } default:{ - printf("Default"); + printf("Wrong Input!"); break; } }