From b5bff3fcbedc1648bc7404b219f639b26fc2f88f Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 16:29:16 +0100 Subject: [PATCH] finished Quiz 2 --- src/main/c/Quiz/Quiz_2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/c/Quiz/Quiz_2.c b/src/main/c/Quiz/Quiz_2.c index f78b26e..0777a51 100644 --- a/src/main/c/Quiz/Quiz_2.c +++ b/src/main/c/Quiz/Quiz_2.c @@ -10,6 +10,14 @@ int quiz_2() while (guess != secretNumber && outOfGuesses == 0) { + if(guessCount < guessLimit) + { + printf("Enter a number: "); + scanf("%d",&guess); + guessCount++; + } else { + outOfGuesses = 1; + } } if (outOfGuesses == 1) {