Browse Source

Refactoring: Added Question 2 (v_AllAboutSpace)

main
fdlt3859 2 years ago
parent
commit
737591cb76
  1. 24
      src/main/quizproject.c

24
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");

Loading…
Cancel
Save