Browse Source

added round 9 function and header to epic game

main
fdlt3885 2 years ago
parent
commit
4b315cb9c7
  1. 32
      src/main/quizproject.c
  2. 2
      src/main/quizproject.h

32
src/main/quizproject.c

@ -1286,6 +1286,37 @@ if (strcmp(answer, "a") == 0) {
return score;
}
int B_round9(void) {
int score = 0;
char answer[20];
printf("Round 9\n");
printf("Question 1: The median is the value separating the higher half from the lower half of a data set.\n");
printf("Options: a.)True b.)False");
printf("Answer: ");
scanf("%s", answer);
if (strcmp(answer, "a") == 0) {
printf("Correct!\n");
score++;
} else {
printf("Incorrect. The answer is True.\n");
}
printf("Question 2: The mode of a data set is the value that occurs most frequently.\n");
printf("Options: a.)True b.)False");
printf("Answer: ");
scanf("%s", answer);
if (strcmp(answer, "a") == 0) {
printf("Correct!\n");
score++;
} else {
printf("Incorrect. The answer is True.\n");
}
return score;
}
void b_epic_game() {
B_displayWelcomeMessage();
b_entertostart();
@ -1303,6 +1334,7 @@ void b_epic_game() {
total_score += B_round6();
total_score += B_round7();
total_score += B_round8();
total_score += B_round9();
}

2
src/main/quizproject.h

@ -62,6 +62,8 @@ int B_round5(void);
int B_round6(void);
int B_round7(void);
int B_round8(void);
int B_round9(void);
#define NUM_QUESTIONS 5
#define round 15

Loading…
Cancel
Save