From f2a51d35676fcafd6550564caebff9e9181b136c Mon Sep 17 00:00:00 2001 From: fdlt3917 Date: Fri, 3 Feb 2023 09:52:46 +0000 Subject: [PATCH] million game - added exit function --- src/main/quizproject.c | 7 ++++++- src/main/quizproject.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 9f22ca9..f372dc7 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -206,6 +206,11 @@ void million_instructions(){ printf("To ask the Host for advice, Enter H\n"); } +void million_exit(int million_a){ + printf("\nYou have come to the end of Who Wants To Be A Millionaire\n"); + printf("\nYour Total Reward is %d\n",million_a); +} + //-------smart_brain_quiz_end------------ void displayWelcomeMessage(void) { @@ -866,7 +871,7 @@ void play_milliongame() { million_i++; } - printf("\n%d\n",million_checkpoint); + million_exit(million_checkpoint); // code for game 3 goes here } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index 9dd9251..eaa18a3 100644 --- a/src/main/quizproject.h +++ b/src/main/quizproject.h @@ -30,6 +30,7 @@ void v_guessingGame(void); void v_guessTheWord(char word[], char guessed[]); void million_instructions(); +void million_exit(int million_a); //----smart_brain_header_begin-----