|
@ -437,9 +437,35 @@ if (score > 2){ |
|
|
displayThankYouMessage(); |
|
|
displayThankYouMessage(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void v_factorlie(void){ |
|
|
|
|
|
char statements[][100] = { |
|
|
|
|
|
"Tomatoes are fruits.", // lie |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
char answers[] = {'L'}; // L for lie, F for fact |
|
|
|
|
|
int num_statements = sizeof(statements) / sizeof(statements[0]); |
|
|
|
|
|
int score = 0; |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < num_statements; i++) { |
|
|
|
|
|
char user_answer; |
|
|
|
|
|
printf("Statement %d: %s\n\n", i + 1, statements[i]); |
|
|
|
|
|
printf("Is this statement a fact (F) or a lie (L)?\n"); |
|
|
|
|
|
printf("Your answer: \n"); |
|
|
|
|
|
scanf(" %c", &user_answer); |
|
|
|
|
|
if (user_answer == answers[i]) { |
|
|
|
|
|
score++; |
|
|
|
|
|
printf("Correct!\n"); |
|
|
|
|
|
} else { |
|
|
|
|
|
printf("Incorrect.\n"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
printf("Your final score is %d out of %d.\n", score, num_statements); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void play_factorlie() { |
|
|
void play_factorlie() { |
|
|
printf("Playing game 2...\n"); |
|
|
printf("Playing game 2...\n"); |
|
|
// code for game 2 goes here |
|
|
|
|
|
|
|
|
v_factorlie(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void play_milliongame() { |
|
|
void play_milliongame() { |
|
|