Browse Source

randomized round 5

main
fdlt3917 2 years ago
parent
commit
4c95dda080
  1. 9
      src/main/quizproject.c

9
src/main/quizproject.c

@ -285,17 +285,18 @@ void ask_hard_questions(void) {
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]);
randNum = arr[i];
printf("[%d] %s\n", i + 1, questions[randNum]);
for (int j = 0; j < 4; j++) {
printf("%s\n", options[i][j]);
printf("%s\n", options[randNum][j]);
}
printf("Enter your answer (A, B, C, or D): ");
char response;
scanf(" %c", &response);
response = toupper(response);
user_answers[i] = response;
user_answers[randNum] = response;
// check each answer
if (user_answers[i] == answers[i]) {
if (user_answers[randNum] == answers[randNum]) {
score++;
correct(score);
} else {

Loading…
Cancel
Save