From 737591cb764a3b70159b1014370e3165466b04d2 Mon Sep 17 00:00:00 2001 From: fdlt3859 Date: Thu, 9 Feb 2023 00:27:09 +0000 Subject: [PATCH] Refactoring: Added Question 2 (v_AllAboutSpace) --- src/main/quizproject.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 657db70..eb2ab4d 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -2931,23 +2931,37 @@ void v_allaboutspace(void){ if (space_choice == 1) { printf("Quiz Start!\n"); - printf("Question 1: What is the largest planet in our solar system?\n"); + printf("\nQuestion 1: What is the largest planet in our solar system?\n\n"); printf("1. Earth\n"); printf("2. Mars\n"); printf("3. Jupiter\n"); printf("4. Saturn\n"); - printf("Enter your answer: "); + printf("\nEnter your answer: "); scanf("%d", &space_answer); if (space_answer == 3) { - printf("Correct!\n"); + printf("\nCorrect!\n"); space_score++; } else { - printf("Incorrect\n"); + printf("\nIncorrect\n"); } } - + printf("\nQuestion 2: What is the smallest planet in our solar system?\n\n"); + printf("1. Mercury\n"); + printf("2. Mars\n"); + printf("3. Venus\n"); + printf("4. Pluto\n"); + printf("\nEnter your answer: "); + scanf("%d", &space_answer); + if (space_answer == 1) { + printf("\nCorrect!\n"); + space_score++; + } else { + printf("\nIncorrect\n"); + } } + + void v_play_allaboutspace(void){ printf("*********************************************\n");