Browse Source

brain_whiz_quiz question and possible answer

main
parent
commit
6a4ede50f7
  1. 34
      src/main/quizproject.c
  2. 3
      src/main/quizproject.h

34
src/main/quizproject.c

@ -758,12 +758,36 @@ void e_smart_brain() {
//-------smart_brain_quiz_end------------
//-------brain_whiz_quiz_begin------------
void math_question2(){
char math_question [][140] ={
"Simplify 5x + 7 - 3x.\n",
"What is the slope-intercept form of the equation of the line that passes through the points (1,2) and (3,6)?\n",
"What is the equation of the line that is parallel to the line y = 2x + 3 and passes through the point (4,7)?\n","Solve for x: x^2 + 4x - 21 = 0.\n",
"Simplify the expression 3x^2 + 5x - 2.\n","What is the equation of the line that passes through the point (1,3) and is perpendicular to the line y = 2x + 1?\n","What is the value of x if the equation 3x - 5 = 12 is solved for x?\n","Simplify the expression 4x + 2(3x + 5).\n", "What is the equation of the line that passes through the point (2,5) and has a slope of 3?\n","Solve for x: 2x + 5 = 11.\n"
};
char math_possible_answer[][140] = {
"[A]. 2x + 7 [b]. x + 5 [c]. 6x + 5 [d]. x + 1",
"[A]. y = 4x + 0 [b]. 2x + 5 [c]. 2x + 0 [d]. 3x + 6",
"[A]. y = 2x + 2 [b]. 2x + 1 [c]. 5x + 8 [d]. 4x +6",
"[A].x = -7 or x = 3 [b]. x = 1 or x = 3 [c]. x = -3 or x = -7 [d]. x = 2 or x = 9",
"[A]. (3x - 2)(x - 2) [b]. (3x + 2)(x - 2) [c]. (6x - 3)(2x - 2) [d]. (3x - 1)(x + 2)",
"[A].y = 0.5x + 8.5 [b]. y = -0.5x + 4.5 [c]. y = 0.5x - 8.5 [d]. y = -0.5x - 8.5",
"[A].x = -2 [b]. x = 2 [c]. x = 7 [d]. x = -1",
"[A]. 10x + 10. [b]. 6x + 13 [c]. 3x + 7 [d]. 2x - 2",
"[A]. y = 7x - 1 [b]. y = 3x - 1 [c]. y = 3x + 3 [d]. y = 3x + 1",
"[A]. x = -2 [b]. x = 3 [c]. x = 5 [d]. x = 11"
};
for_loop_print_question(math_question, math_possible_answer);
}
void for_loop_print_question() {
for (int i = 1; i < 4; i++){
void for_loop_print_question(char mathQuestions[][140], char mathPossible[][140]) {
for (int i = 1; i < 5; i++){
char user_answer;
printf("[%d]. Simplify 5x + 7 - 3x.\n",i);
printf("[A]. 2x + 7 [B]. 3x + 7 [C]. x + 6\n");
printf("[%d]. %s",i, mathQuestions[i]);
printf("%s", mathPossible[i]);
scanf(" %c", &user_answer);
if (user_answer == 'A') {
printf("Right!\n");
@ -3366,7 +3390,7 @@ int main(int argc, char *argv[]) {
jump_to_menu = 1;
break;
case 21:
for_loop_print_question();
math_question2();
jump_to_menu = 1;
break;
case 22:

3
src/main/quizproject.h

@ -140,7 +140,8 @@ void b_historyevents();
//-------brain_whiz_header_begin------------
void for_loop_print_question();
void for_loop_print_question(char [][140], char [][140]);
void math_question2();
//-------brain_whiz_header_end-------------

Loading…
Cancel
Save