|
|
@ -2295,6 +2295,74 @@ void b_guessbirthyear() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//Germany Quiz |
|
|
|
|
|
|
|
void b_germanyquiz() |
|
|
|
{ |
|
|
|
int score = 0; |
|
|
|
|
|
|
|
printf("Welcome to Germany Quiz.\n\n"); |
|
|
|
printf("1. Germany is located in Europe.\n"); |
|
|
|
printf("True or False?\n"); |
|
|
|
char answer1[5]; |
|
|
|
scanf("%s", answer1); |
|
|
|
if (strcmp(answer1, "True") == 0) { |
|
|
|
printf("Correct!\n"); |
|
|
|
score++; |
|
|
|
} else { |
|
|
|
printf("Incorrect. The answer is True.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf("2. Berlin is the capital city of Germany.\n"); |
|
|
|
printf("True or False?\n"); |
|
|
|
char answer2[5]; |
|
|
|
scanf("%s", answer2); |
|
|
|
if (strcmp(answer2, "True") == 0) { |
|
|
|
printf("Correct!\n"); |
|
|
|
score++; |
|
|
|
} else { |
|
|
|
printf("Incorrect. The answer is True.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf("3. The currency used in Germany is the Euro.\n"); |
|
|
|
printf("True or False?\n"); |
|
|
|
char answer3[5]; |
|
|
|
scanf("%s", answer3); |
|
|
|
if (strcmp(answer3, "True") == 0) { |
|
|
|
printf("Correct!\n"); |
|
|
|
score++; |
|
|
|
} else { |
|
|
|
printf("Incorrect. The answer is True.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf("4. The population of Germany is over 100 million.\n"); |
|
|
|
printf("True or False?\n"); |
|
|
|
char answer4[5]; |
|
|
|
scanf("%s", answer4); |
|
|
|
if (strcmp(answer4, "False") == 0) { |
|
|
|
printf("Correct!\n"); |
|
|
|
score++; |
|
|
|
} else { |
|
|
|
printf("Incorrect. The answer is False.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf("5. The official language of Germany is French.\n"); |
|
|
|
printf("True or False?\n"); |
|
|
|
char answer5[5]; |
|
|
|
scanf("%s", answer5); |
|
|
|
if (strcmp(answer5, "False") == 0) { |
|
|
|
printf("Correct!\n"); |
|
|
|
score++; |
|
|
|
} else { |
|
|
|
printf("Incorrect. The answer is False.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf("You scored %d out of 5.\n", score); |
|
|
|
printf("Thank You for Playing Germany Quiz.\n"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void v_play_rockpapersciss(){ |
|
|
|
int player_choice, computer_choice, player_score = 0, computer_score = 0; |
|
|
@ -2770,7 +2838,8 @@ int main(int argc, char *argv[]) { |
|
|
|
printf("12. Mini-Game: Guess the animal!\n"); |
|
|
|
printf("13. Basketball Quiz!\n"); |
|
|
|
printf("14. Guess Barack Obama's birth Year!\n"); |
|
|
|
printf("15. Exit\n"); |
|
|
|
printf("15. Germany Quiz!\n"); |
|
|
|
printf("16. Exit\n"); |
|
|
|
printf("Enter your choice: "); |
|
|
|
scanf("%d", &choice); |
|
|
|
v_progress_bar(argc,argv); |
|
|
@ -2833,6 +2902,10 @@ int main(int argc, char *argv[]) { |
|
|
|
jump_to_menu = 1; |
|
|
|
break; |
|
|
|
case 15: |
|
|
|
b_germanyquiz(); |
|
|
|
jump_to_menu = 1; |
|
|
|
break; |
|
|
|
case 16: |
|
|
|
printf("\nThank you for trying our C code!\n"); |
|
|
|
break; |
|
|
|
default: |
|
|
|