Browse Source

brain_whiz introduction/instruction

main
parent
commit
5b5939017f
  1. 23
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

23
src/main/quizproject.c

@ -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[]) {
for (int i = 0; i < 5; i++){
char user_answer;
@ -3410,7 +3431,7 @@ int main(int argc, char *argv[]) {
jump_to_menu = 1;
break;
case 21:
math_question2();
math_introduction();
jump_to_menu = 1;
break;
case 22:

1
src/main/quizproject.h

@ -143,6 +143,7 @@ void b_historyevents();
void for_loop_print_question(char [][140], char [][140], char []);
void math_question2();
void compare_answer(char, char);
void math_introduction();
//-------brain_whiz_header_end-------------

Loading…
Cancel
Save