Browse Source

added write review function and header(epic game)

main
fdlt3885 2 years ago
parent
commit
1c201f4ad0
  1. 18
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

18
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();
}

1
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

Loading…
Cancel
Save