Browse Source

wrong function

main
parent
commit
c9a178fe0b
  1. 7
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

7
src/main/quizproject.c

@ -67,6 +67,10 @@ void correct(int score2){
printf("\nCorrect!\n"); printf("\nCorrect!\n");
printf("You have %d points now\n\n", score); 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 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); correct(score);
} else { } else {
printf("\nwrong!\n");
printf("You have %d points now\n\n", score);
wrong(score);
} }
} }
} }

1
src/main/quizproject.h

@ -8,6 +8,7 @@ void displayInstructions(void);
void displayGoodLuckMessage(void); void displayGoodLuckMessage(void);
void ask_questions(void); void ask_questions(void);
void correct(int); void correct(int);
void wrong(int);
int score = 0; int score = 0;
#endif #endif
Loading…
Cancel
Save