diff --git a/src/main/quizproject.c b/src/main/quizproject.c index bd84bfa..394461e 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -209,6 +209,32 @@ void ask_hard_questions(void) { } else { wrong(score); } + } + if ( score < 4) { + printf("You lost! Better luck next time\n"); + break; + } else { + printf("\t\t--------------------Round 5-------------------\n\n"); + printf(">>This is the final round. Good Luck!<<\n\n"); + for (int i = 0; i < 2; i++) { + + printf("[%d] %s\n", i + 1, questions[i]); + for (int j = 0; j < 4; j++) { + printf("%s\n", options[i][j]); + } + printf("Enter your answer (A, B, C, or D): "); + char response; + scanf(" %c", &response); + response = toupper(response); + user_answers[i] = response; + // check each answer + if (user_answers[i] == answers[i]) { + score++; + correct(score); + } else { + wrong(score); + } + } } k++; }