|
|
@ -440,9 +440,11 @@ displayThankYouMessage(); |
|
|
|
void v_factorlie(void){ |
|
|
|
char statements[][100] = { |
|
|
|
"Tomatoes are fruits.", // fact |
|
|
|
"The Great Wall of China is visible from space.", // lie |
|
|
|
"Water freezes at 0 degrees Celsius.", // fact |
|
|
|
|
|
|
|
}; |
|
|
|
char answers[] = {'F'}; // L for lie, F for fact |
|
|
|
char answers[] = {'F','L','F'}; // L for lie, F for fact |
|
|
|
int num_statements = sizeof(statements) / sizeof(statements[0]); |
|
|
|
int score = 0; |
|
|
|
|
|
|
@ -456,9 +458,9 @@ void v_factorlie(void){ |
|
|
|
user_answer = toupper(user_answer); |
|
|
|
if (user_answer == answers[i]) { |
|
|
|
score++; |
|
|
|
printf("Correct!\n"); |
|
|
|
printf("Correct! You get a point.\n\n"); |
|
|
|
} else { |
|
|
|
printf("Incorrect.\n"); |
|
|
|
printf("Sorry, its incorrect. No points!\n\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("Your final score is %d out of %d.\n", score, num_statements); |
|
|
|