|
@ -169,6 +169,47 @@ void ask_questions(void) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ask_hard_questions(void) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int k = 0; |
|
|
|
|
|
while (k < 1) { |
|
|
|
|
|
|
|
|
|
|
|
printf("\t\t--------------------Round 4-------------------\n\n"); |
|
|
|
|
|
printf(">>In this round you need to answer 2 questions correctly to move to Round 5<<\n\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char questions[NUM_QUESTIONS][256] = { |
|
|
|
|
|
"What is the capital of France?", |
|
|
|
|
|
"Who was the first president of the United States?" |
|
|
|
|
|
}; |
|
|
|
|
|
char options[NUM_QUESTIONS][4][256] = { |
|
|
|
|
|
{ "A) Berlin", "B) Paris", "C) London", "D) Rome" }, |
|
|
|
|
|
{ "A) George Washington", "B) John Adams", "C) Thomas Jefferson", "D) James Madison" } |
|
|
|
|
|
}; |
|
|
|
|
|
char answers[NUM_QUESTIONS] = { 'B', 'A'}; // correct answers (A, B, C, or D) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char user_answers[NUM_QUESTIONS]; // to store user answers (A, B, C, or D) |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 2; i++) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("[%d] %s\n", i + 1, questions[i]); |
|
|
|
|
|
for (int j = 0; j < 4; j++) { |
|
|
|
|
|
printf("%s\n", options[i][j]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
k++; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void hint(int question_num) { |
|
|
void hint(int question_num) { |
|
|
char qC[][100] = { |
|
|
char qC[][100] = { |
|
|
"The Tallest mountain is 8,849m." |
|
|
"The Tallest mountain is 8,849m." |
|
@ -193,6 +234,9 @@ int main(){ |
|
|
} |
|
|
} |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
ask_questions(); |
|
|
ask_questions(); |
|
|
|
|
|
if (score > 2){ |
|
|
|
|
|
ask_hard_questions(); |
|
|
|
|
|
} |
|
|
displayThankYouMessage(); |
|
|
displayThankYouMessage(); |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|