From 3bc63ddf6b40f08fa8a4c6264855e222c94afdfb Mon Sep 17 00:00:00 2001 From: fdlt3917 Date: Tue, 31 Jan 2023 13:56:45 +0000 Subject: [PATCH] million game - compare user and std answers --- src/main/quizproject.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index f42d885..da9d3c3 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -670,16 +670,36 @@ void play_milliongame() { switch(million_user_answers[million_i]){ case 'A': - printf("\nYou inputed %c\n", million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ + printf("\nCorrect!"); + } + else{ + printf("\nIncorrect!"); + } break; case 'B': - printf("\nYou inputed %c\n", million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ + printf("\nCorrect!"); + } + else{ + printf("\nIncorrect!"); + } break; case 'C': - printf("\nYou inputed %c\n", million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ + printf("\nCorrect!"); + } + else{ + printf("\nIncorrect!"); + } break; case 'D': - printf("\nYou inputed %c\n", million_user_answers[million_i]); + if(million_user_answers[million_i] == million_std_answers[million_i]){ + printf("\nCorrect!"); + } + else{ + printf("\nIncorrect!"); + } break; default: goto point_one;