From 73d14e56b65ce908a982a120884f3b0e1c769c19 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Tue, 6 Feb 2024 18:30:19 +0100 Subject: [PATCH] refactoring 6: Header und Ausgabe in eingabe() --- src/wwm.c | 3 ++- src/wwm.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index ee223e8..e15b08e 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -23,6 +23,7 @@ int crandomNumber() { } int ceingabe() { + printf("Your answer (1-4):"); scanf("%d", &useranswer); return useranswer; }; @@ -78,7 +79,7 @@ void wwm(){ for (int i = 0; i < 4; i++) { printf("%d. %s \n", i + 1, answers[frage][i]); } - printf("Your answer (1-4):"); + ceingabe(); diff --git a/src/wwm.h b/src/wwm.h index 104550c..ab4ba12 100644 --- a/src/wwm.h +++ b/src/wwm.h @@ -9,6 +9,7 @@ extern int useranswer; extern int Geldstufen[]; int crandomNumber(); +int ceingabe(); int setGeld(int runde);