diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 8f3c64c..6149fa9 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -267,11 +267,22 @@ void e_math_ques() { 'B', }; - - e_math_print(e_math, e_math_possible, e_math_solution); + char e_math_statement[][100] = { + "Solution: x = 2", + "Solution: 4x^2 - 9x + 6 = 4x^2 - 9x + 6x - 6x + 6 = 4x^2 - 3x + 6", + "Solution: The slope of the line is 2.", + "Solution: The equation of the line is y = 2x - 2.", + "Solution: 3(2x + 4) - 5 = 6x + 12 - 5 = 6x + 7", + "Solution: The equation of the line is y = -0.5x + 8.5.", + "Solution: x = -2 or x = -2", + "Solution: 2(x + 3) + 4(x + 2) = 2x + 6 + 4x + 8 = 6x + 14", + "Solution: The equation of the circle is (x - 3)^2 + (y - 4)^2 = 25.", + "Solution: x = 6.", + }; + e_math_print(e_math, e_math_possible, e_math_solution, e_math_statement); } -void e_math_print(char e_ques[][140], char e_poss[][140], char e_math_solution[]){ +void e_math_print(char e_ques[][140], char e_poss[][140], char e_math_solution[], char e_math_statement[][100]){ int i = 0; @@ -286,6 +297,7 @@ void e_math_print(char e_ques[][140], char e_poss[][140], char e_math_solution[] printf("Correct!\n"); } else { printf("Wrong!\n"); + printf("%s\n\n", e_math_statement[i]); } i++; } diff --git a/src/main/quizproject.h b/src/main/quizproject.h index 8bb0458..e469527 100644 --- a/src/main/quizproject.h +++ b/src/main/quizproject.h @@ -43,7 +43,7 @@ int math_answer(int); void math_display_choice(); void math_enter_game(); void e_math_ques(void); -void e_math_print(char [][140], char [][140], char []); +void e_math_print(char [][140], char [][140], char [], char [][100]); void math_help(void); void math_choose_game(void);