Browse Source

math_facts for brain_whiz

main
parent
commit
0a4a94c757
  1. 44
      src/main/quizproject.c
  2. 3
      src/main/quizproject.h

44
src/main/quizproject.c

@ -758,6 +758,49 @@ void e_smart_brain() {
//-------smart_brain_quiz_end------------ //-------smart_brain_quiz_end------------
//-------brain_whiz_quiz_begin------------ //-------brain_whiz_quiz_begin------------
void math_fact_lie(int question_num) {
char math_facts_lies [][100] = {
"The sum of two odd numbers is always even.",
"The value of pi is equal to exactly 3.14.",
"The square root of 144 is equal to 12.",
"The number zero is considered positive.",
"The number 1 is considered a prime number.",
"The square root of 9 is 3.",
"The sum of the angles in a triangle is equal to 180 degrees.",
"0 is a positive number.",
"The product of 2 even numbers is always an even number.",
"The number 1 is a prime number.",
"Every prime number is odd.",
"The value of pi (π) is equal to 3.14.",
"The number 0 is neither positive nor negative.",
"Every triangle has three sides of equal length.",
"The sum of the first n positive integers is equal to n(n+1)/2."
};
printf("%s\n", math_facts_lies[question_num]);
}
void math_fact_lie_solutions(int solution_num) {
char math_fact_lie_solution [][10] = {
"fact", "lie", "fact","lie","fact","fact","fact","lie","fact","fact","fact","lie","fact","lie","fact"
};
printf("%s", math_fact_lie_solution[solution_num]);
}
void math_fact_lie_print() {
for(int i = 0; i < 8; i++){
switch (i) {
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
math_fact_lie(i);
}
}
}
void math_question2(){ void math_question2(){
char math_question [][140] ={ char math_question [][140] ={
"Simplify 5x + 7 - 3x.\n", "Simplify 5x + 7 - 3x.\n",
@ -820,6 +863,7 @@ void math_introduction(){
if( input1 == 1 ){ if( input1 == 1 ){
math_question2(); math_question2();
math_fact_lie_print();
} else{ } else{
printf("\t\t-------------------------------------------------------\n"); printf("\t\t-------------------------------------------------------\n");
printf("\t\t Sorry to see you go.\n "); printf("\t\t Sorry to see you go.\n ");

3
src/main/quizproject.h

@ -144,6 +144,9 @@ void for_loop_print_question(char [][140], char [][140], char []);
void math_question2(); void math_question2();
void compare_answer(char, char); void compare_answer(char, char);
void math_introduction(); void math_introduction();
void math_fact_lie(int);
void math_fact_lie_solutions(int);
void math_fact_lie_print();
//-------brain_whiz_header_end------------- //-------brain_whiz_header_end-------------

Loading…
Cancel
Save