From 03ae13e63c4ac88eff0e0284e47c929358b10eb6 Mon Sep 17 00:00:00 2001 From: fdlt3917 Date: Wed, 1 Feb 2023 09:54:50 +0000 Subject: [PATCH] million game - added phone a friend option --- src/main/quizproject.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index a45eb1d..0a3b91d 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -748,6 +748,22 @@ void play_milliongame() { scanf(" %c", &million_user_answers[million_i]); million_user_answers[million_i] = toupper(million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ + printf("\nCorrect!"); + } + else{ + million_stay_in_game = 1; + printf("\nIncorrect!"); + } + break; + case 'P': + million_lifeline_friend = 0; + printf("\nYou can now ask a friend for help...\n"); + + printf("Enter a valid Response: "); + scanf(" %c", &million_user_answers[million_i]); + million_user_answers[million_i] = toupper(million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ printf("\nCorrect!"); }