|
@ -806,6 +806,27 @@ void compare_answer(char compare, char character1){ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void math_introduction(){ |
|
|
|
|
|
printf("\n\t------------------------Instructions-------------------------------\n\n"); |
|
|
|
|
|
printf("\t\tThis game present a set of mathematical questions.\n"); |
|
|
|
|
|
printf("\t\tThere are 4 possible answers(A-D).\n"); |
|
|
|
|
|
printf("\t\tChoose the right answer by typing the letter and press enter.\n\n"); |
|
|
|
|
|
printf("\t-------------------------------------------------------------------\n\n"); |
|
|
|
|
|
printf( "\t\t !! Wish you all the best !! \n\n"); |
|
|
|
|
|
printf("\t ......................................................\n" ); |
|
|
|
|
|
printf( "\n\nDo you still wish to continue playing ? If yes, then press 1. Else, press 0 : " ); |
|
|
|
|
|
int input1; |
|
|
|
|
|
scanf("%d", &input1); |
|
|
|
|
|
|
|
|
|
|
|
if( input1 == 1 ){ |
|
|
|
|
|
math_question2(); |
|
|
|
|
|
} else{ |
|
|
|
|
|
printf("\t\t-------------------------------------------------------\n"); |
|
|
|
|
|
printf("\t\t Sorry to see you go.\n "); |
|
|
|
|
|
printf("\t\t-------------------------------------------------------\n\n"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void for_loop_print_question(char mathQuestions[][140], char mathPossible[][140], char character[]) { |
|
|
void for_loop_print_question(char mathQuestions[][140], char mathPossible[][140], char character[]) { |
|
|
for (int i = 0; i < 5; i++){ |
|
|
for (int i = 0; i < 5; i++){ |
|
|
char user_answer; |
|
|
char user_answer; |
|
@ -3410,7 +3431,7 @@ int main(int argc, char *argv[]) { |
|
|
jump_to_menu = 1; |
|
|
jump_to_menu = 1; |
|
|
break; |
|
|
break; |
|
|
case 21: |
|
|
case 21: |
|
|
math_question2(); |
|
|
|
|
|
|
|
|
math_introduction(); |
|
|
jump_to_menu = 1; |
|
|
jump_to_menu = 1; |
|
|
break; |
|
|
break; |
|
|
case 22: |
|
|
case 22: |
|
|