|
@ -780,11 +780,32 @@ void math_fact_lie(int question_num) { |
|
|
printf("\n%s\n", math_facts_lies[question_num]); |
|
|
printf("\n%s\n", math_facts_lies[question_num]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void math_fact_lie_solutions(int solution_num) { |
|
|
|
|
|
|
|
|
void math_fact_lie_solutions(int init) { |
|
|
char math_fact_lie_solution [][10] = { |
|
|
char math_fact_lie_solution [][10] = { |
|
|
"fact", "lie", "fact","lie","fact","fact","fact","lie","fact","fact","fact","lie","fact","lie","fact" |
|
|
"fact", "lie", "fact","lie","fact","fact","fact","lie","fact","fact","fact","lie","fact","lie","fact" |
|
|
}; |
|
|
}; |
|
|
printf("%s", math_fact_lie_solution[solution_num]); |
|
|
|
|
|
|
|
|
math_solution(math_fact_lie_solution,init); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void math_solution(char math_solutions[][10], int init1){ |
|
|
|
|
|
char user_answer[5], fact_answer[5]; |
|
|
|
|
|
int k = 0; |
|
|
|
|
|
scanf("%s", user_answer); |
|
|
|
|
|
for(int j = 0; j < 5; j++){ |
|
|
|
|
|
fact_answer[j] = math_solutions[init1][j]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < strlen(fact_answer); i++){ |
|
|
|
|
|
if (user_answer[i] == fact_answer[i]) { |
|
|
|
|
|
k++; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(strlen(fact_answer) == k){ |
|
|
|
|
|
printf("right!\n"); |
|
|
|
|
|
}else { |
|
|
|
|
|
printf("worng!\n"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void math_fact_lie_print() { |
|
|
void math_fact_lie_print() { |
|
@ -800,8 +821,7 @@ void math_fact_lie_print() { |
|
|
switch (i) { |
|
|
switch (i) { |
|
|
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: |
|
|
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: |
|
|
math_fact_lie(i); |
|
|
math_fact_lie(i); |
|
|
char user_answer[5]; |
|
|
|
|
|
scanf("%s", user_answer); |
|
|
|
|
|
|
|
|
math_fact_lie_solutions(i);break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|