From 490a3411705e27b10a0d7aabd0c82de0696c1d83 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 19:01:27 +0100 Subject: [PATCH] refactoring 4: Anpassungen in Header und Programm --- src/wwm.c | 3 ++- src/wwm.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 611946c..1d7c0d8 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -40,7 +40,7 @@ void wwm(){ }; - for (r = 1; r <= 15; r++){ + for (int r = 1; r <= 15; r++){ printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 5; @@ -66,4 +66,5 @@ void wwm(){ return; + } } diff --git a/src/wwm.h b/src/wwm.h index b38a849..edddd39 100644 --- a/src/wwm.h +++ b/src/wwm.h @@ -1,6 +1,11 @@ #ifndef WWM_H #define WWM_H +extern int runde; +extern int geld; +extern int frage; +extern int useranswer; + extern int Geldstufen[]; int setGeld(int runde);