Browse Source

Added Feedback Form

main
fdlt3859 2 years ago
parent
commit
b46a35f3af
  1. 18
      src/main/quizproject.c
  2. 3
      src/main/quizproject.h

18
src/main/quizproject.c

@ -447,6 +447,22 @@ void play_game3() {
// code for game 3 goes here
}
void feedbackForm(void){
int rating;
char feedback[1000];
printf("\nQuick Feedback Form:\n\n");
printf("On a scale of 1 to 5, how would you rate the quiz? (1 being poor and 5 being excellent): ");
scanf("%d", &rating);
getchar();
printf("Please provide any additional feedback: ");
fgets(feedback, sizeof(feedback), stdin);
printf("\nThank you for your feedback!\n");
printf("Your rating: %d\n", rating);
printf("Your feedback: %s", feedback);
}
int main() {
int choice;
printf("Welcome to the Game Menu!\n");
@ -498,7 +514,7 @@ int main() {
default:
printf("Invalid choice!\n");
}
feedbackForm();
return 0;
}

3
src/main/quizproject.h

@ -20,7 +20,8 @@ void printOutOption(char [][100], char [][100],char [], int, int, int[] );
void looping(char [][100], char [][100], char [], int []);
void displayThankYouMessage(void);
int* randomNumber();
void hintForHardQuestions(int);
void hintForHardQuestions(int);
void feedbackForm(void);
#define NUM_QUESTIONS 5

Loading…
Cancel
Save