From b46a35f3af12f26e5ab35b2a3c24ae1238078265 Mon Sep 17 00:00:00 2001 From: fdlt3859 Date: Sat, 28 Jan 2023 21:03:56 +0000 Subject: [PATCH] Added Feedback Form --- src/main/quizproject.c | 18 +++++++++++++++++- src/main/quizproject.h | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index c4e69eb..9841ff6 100644 --- a/src/main/quizproject.c +++ b/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; } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index ba9f1a6..1b51c6d 100644 --- a/src/main/quizproject.h +++ b/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