diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 3f97921..d17af44 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -1071,6 +1071,37 @@ int B_round1(void) { return score; } +int B_round2(void) { + int score = 0; + char answer[20]; + + printf("Round 2 - True or False\n"); + printf("Question 1: The sun rises in the west.\n"); + printf("Options: a.)Ture b.)False"); + printf("Answer: "); + scanf("%s", answer); + + if (strcmp(answer, "b") == 0) { + printf("Correct!\n"); + score++; + } else { + printf("Incorrect. The answer is b.\n"); + } + + printf("Question 2: The capital city of France is known as the 'City of Love'.\n"); + printf("Options: a.)Ture b.)False"); + printf("Answer: "); + scanf("%s", answer); + + if (strcmp(answer, "a") == 0) { + printf("Correct!\n"); + score++; + } else { + printf("Incorrect. The answer is a.\n"); + } + return score; +} + void b_epic_game() { B_displayWelcomeMessage(); b_entertostart(); @@ -1081,6 +1112,7 @@ void b_epic_game() { int total_score = 0; total_score += B_testround(); total_score += B_round1(); + total_score += B_round2(); } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index e9aac89..ce40b5a 100644 --- a/src/main/quizproject.h +++ b/src/main/quizproject.h @@ -55,6 +55,7 @@ void B_displayGameInstructions(void); void B_show_time(void); int B_testround(void); int B_round1(void); +int B_round2(void); #define NUM_QUESTIONS 5 #define round 15