diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 9b9652d..c73f24d 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -559,6 +559,9 @@ int main() { printf("\n\nPlease choose one of the number options from below\n\n"); } + int jump_to_menu = 0; + + while (choice != 4 || jump_to_menu) { printf("Welcome to the Game Menu!\n"); printf("1. QuizGame\n"); printf("2. Fact or Lie?\n"); @@ -570,22 +573,34 @@ int main() { switch(choice) { case 1: play_quizgame(); + jump_to_menu = 1; break; case 2: play_factorlie(); + jump_to_menu = 1; break; case 3: play_milliongame(); + jump_to_menu = 1; break; case 4: - printf("Exiting the Game Menu...\n"); + printf("\nThank you for trying our C code!\n"); break; default: printf("Invalid choice!\n"); } + if (jump_to_menu) { + jump_to_menu = 0; + printf("\nType any key and press enter to jump back to the menu.\n"); + char jump_key; + scanf(" %c", &jump_key); + jump_key = toupper(jump_key); + } + } feedbackForm(); displayCredits(); return 0; } +