Browse Source

Added Feedback Form

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

18
src/main/quizproject.c

@ -447,6 +447,22 @@ void play_game3() {
// code for game 3 goes here // 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 main() {
int choice; int choice;
printf("Welcome to the Game Menu!\n"); printf("Welcome to the Game Menu!\n");
@ -498,7 +514,7 @@ int main() {
default: default:
printf("Invalid choice!\n"); printf("Invalid choice!\n");
} }
feedbackForm();
return 0; return 0;
} }

1
src/main/quizproject.h

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

Loading…
Cancel
Save