From 0ace76ce85a17b25edcf0863396d33fa43172585 Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 19:42:01 +0100 Subject: [PATCH] =?UTF-8?q?Hinzuf=C3=BCgen=20des=20Displaywortes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Tim/hangman.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index 6704dee..df569e2 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -23,11 +23,23 @@ void hangman() do { char guessWord[30]; + char displayWord[30]; int length; strcpy(guessWord,wordlist[rand() % 10]); length = strlen(guessWord); printf("%s %d\n",guessWord, length); - + for (int i = 0; i <= length; i++) + { + if(i