diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 5d4b42a..1da65bc 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -1360,6 +1360,23 @@ void rate(void){ printf("Your rating: %d/10\n", rate); } +void B_write_review(void) { + char response; + char review[100]; + printf("Do you want to write a review (y/n)? "); + scanf(" %c", &response); + + if (response == 'y') { + printf("Please write your review:\n"); + scanf("%s", review); + printf("Thank you for your review\n"); + } else if (response == 'n') { + printf("Thank you for your time.\n"); + } else { + printf("Invalid response.\n"); + } +} + void b_epic_game() { B_displayWelcomeMessage(); b_entertostart(); @@ -1382,6 +1399,7 @@ void b_epic_game() { printf("You scored %d out of 22.\n", total_score); B_saythankyou(); rate(); + B_write_review(); } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index 1e50168..6379f88 100644 --- a/src/main/quizproject.h +++ b/src/main/quizproject.h @@ -66,6 +66,7 @@ int B_round9(void); int B_round10(void); void B_saythankyou(void); void rate(void); +void B_write_review(void); #define NUM_QUESTIONS 5