From 7826b0aa77e7c8216148684f9f58129b031acff2 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:24:37 +0100 Subject: [PATCH] functional 13: Ende nach 15 Runden extra Ausgabe --- src/wwm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 945636c..9e4b0bf 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -50,7 +50,14 @@ void wwm(){ }; - for (int r = 1; r <= 15; r++){ + for (int r = 1; r <= 16; r++){ + if (r == 16) { + printf("Congratulations ! You have won 1.000.000 $"); + return; + } + + + printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 10;