From e33333fc5a782219dfe0fd16cde2e095d17459b3 Mon Sep 17 00:00:00 2001 From: Celine Khazarian Date: Thu, 8 Feb 2024 23:31:08 +0100 Subject: [PATCH] Int Modus 2 Mensch 1 Zahl waehlen --- src/main/c/SchereSteinPapier.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/c/SchereSteinPapier.c b/src/main/c/SchereSteinPapier.c index 92c540b..54256e1 100644 --- a/src/main/c/SchereSteinPapier.c +++ b/src/main/c/SchereSteinPapier.c @@ -84,4 +84,14 @@ int Modus2() { scanf("%s", Mensch1); printf("\n\t\t\t\tName Mensch 2: "); scanf("%s", Mensch2); + char wahl1 = '0', wahl2 = '0'; + while (wahl1 != '3' && wahl1 != '1' && wahl1 != '2') { + printf("\n\t\t\t\t%s, waehlen Sie 1 fuer Schere, 2 fuer Stein oder 3 fuer Papier: ", Mensch1); + scanf(" %c", &wahl1); + } +#ifdef _WIN32 + system("cls"); +#else + system("clear"); +#endif } \ No newline at end of file