From f3c289167b6d28f8552c128857de57560a4c9f5b Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Mon, 5 Feb 2024 13:31:44 +0100 Subject: [PATCH] blackjack guthaben einwerfen --- src/main/c/Stefan/blackjack.c | 15 +++++++++++++-- src/main/c/Stefan/blackjack.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/c/Stefan/blackjack.c b/src/main/c/Stefan/blackjack.c index 63f8bd8..a7af619 100644 --- a/src/main/c/Stefan/blackjack.c +++ b/src/main/c/Stefan/blackjack.c @@ -5,6 +5,17 @@ int blackjack(){ - printf("Blackjack \n"); + printf("Welcome to Blackjack \n"); + + int balance = getBalanceBJ(); + return 0; -} \ No newline at end of file +} + +int getBalanceBJ(){ + int balance = 0; + printf("Guthaben einwerfen: "); + scanf("%d", &balance); + printf("Dein Guthaben: %d", balance); + return balance; +} diff --git a/src/main/c/Stefan/blackjack.h b/src/main/c/Stefan/blackjack.h index 26037b2..69f1176 100644 --- a/src/main/c/Stefan/blackjack.h +++ b/src/main/c/Stefan/blackjack.h @@ -3,5 +3,6 @@ int blackjack(); +int getBalanceBJ(); #endif // BLACKJACK_H \ No newline at end of file