From c9a178fe0b28c4406030762af8c4233994c49ef6 Mon Sep 17 00:00:00 2001 From: fdlt3914 Date: Mon, 23 Jan 2023 11:38:51 +0000 Subject: [PATCH] wrong function --- src/main/quizproject.c | 7 +++++-- src/main/quizproject.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 81a4ca1..efdfaac 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -67,6 +67,10 @@ void correct(int score2){ printf("\nCorrect!\n"); printf("You have %d points now\n\n", score); } +void wrong(int score1){ + printf("\nwrong!\n"); + printf("You have %d points now\n\n", score); +} void looping(char qS[][100], char qC[][100], char aS[]){// 5 @@ -85,8 +89,7 @@ void looping(char qS[][100], char qC[][100], char aS[]){// 5 correct(score); } else { - printf("\nwrong!\n"); - printf("You have %d points now\n\n", score); + wrong(score); } } } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index ed964a0..5b20378 100644 --- a/src/main/quizproject.h +++ b/src/main/quizproject.h @@ -8,6 +8,7 @@ void displayInstructions(void); void displayGoodLuckMessage(void); void ask_questions(void); void correct(int); +void wrong(int); int score = 0; #endif