From f74b350ebdd5e1715339dbb8acb92b55db251a0c Mon Sep 17 00:00:00 2001 From: Ronja Awe Date: Thu, 2 Feb 2023 11:51:03 +0100 Subject: [PATCH] =?UTF-8?q?if=20Anweisung=20f=C3=BCr=20richtige=20antwort?= =?UTF-8?q?=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/c/labyrinth.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/c/labyrinth.c b/src/c/labyrinth.c index 9e54bf3..2c40653 100644 --- a/src/c/labyrinth.c +++ b/src/c/labyrinth.c @@ -53,7 +53,7 @@ void wegsuchen(lab laby, bool* done, int y, int x, int ziely, int zielx){ void labyrinthschritte(lab laby, int hoehe, int breite, int schritte){ - + int antwort = 0; for(int i = 0; i < hoehe; i++){ for(int j = 0; j < breite; j++){ @@ -63,4 +63,11 @@ void labyrinthschritte(lab laby, int hoehe, int breite, int schritte){ } printf("\n"); + antwort = 14; + + if(antwort == schritte){ + printf("Richtig, Sie brauchen %d Schritte.\n", schritte); + } + + } \ No newline at end of file