From a2fce8a2fc4b081322e72dc7828d2dcef37acbac Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Tue, 6 Feb 2024 20:46:54 +0100 Subject: [PATCH] functional 27: if Anweisung-Implementierung Runde 11-15 --- src/wwm.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 71cf4f8..4c93944 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -177,6 +177,29 @@ void wwm(){ printf("What a shame! That is wrong! \n You lost %d $ ", geld); break; } -} + } + + if (r > 10 && r <= 15) { + printf("___________________________________________________________\n\n"); + printf("You are at stage %d and have %d $\n", runde + 1, geld); + crandomNumber(); + printf("Question %d: %s\n", runde + 1, questions3[frage]); + for (int i = 0; i < 4; i++) { + printf("%d. %s \n", i + 1, answers3[frage][i]); + }; + + ceingabe(); + + + if (useranswer == correctAnswer3[frage]) { + printf("That is correct!\n"); + runde++; + setGeld(runde); + } + else { + printf("What a shame! That is wrong! \n You lost %d $ ", geld); + break; + } + } } }