plz help me in this assignment

Math Problem Generator

Your job will be to write a program to teach math to school children. Your program will accomplish this by showing sets of math problems to the user and allowing them to enter an answer. The program should tell the user if they are correct and should continue providing additional questions. The program will keep track of correct and incorrect answers. The questions should use random numbers and should be simple enough math problems that someone could do them without a calculator (ie. 8 + 17 =). The program will be timed (60 seconds for instance – this should be variable) and should keep track of how many you have gotten correct and incorrect during the time limit. As the user correctly answers the questions the difficulty should increase:
1+4 =
15+2-1=

15 + 22 * (18 / 2) % 14 =
Lastly, the program should have some kind of end and review screen which shows the user’s score and allows them to restart. Additional points may be earned by completing any of the following:
1. Add a player system, where 2 or more players can compete against each other to score the highest score (probably in a hot-seat fashion). Or a race to answer using the numpad and the number keys.
2. Add a solution explanations for questions. If the user answers certain answers maybe your program can tell that the user did not properly use order of operations. Making a suggestion and perhaps showing an order of operations chart that they can review.
3. Adding additional subjects the player could choose from (algebra, geometry, precal…).
4. Add file input for question types and designs.
5. Adding a file output that would keep track of high scores.
6. Additional improvements may be added (but not at the expense of the main requirements).
This assignment will be due 19th March. Submission will include all of the .cpp files needed to run the program (prefer them to be integrated into one file).
The instructor reserves the right to amend the requirements.

Sample Run:
Welcome to Math Friend, the best math game ever made. You will be
presented with a series of questions that you will be required to
answer. You have 60 seconds to answer as many questions as possible
and your time will start NOW!!!

60 seconds remaining
Question 1:
81 – 5 = _
76
Correct!

43 seconds remaining
Question 2:
9 * 3 – 1 = _
22
Incorrect : (
The answer was 26

37 seconds remaining
Question 3:
6+9 - _ = 7
11
Incorrect : (
The answer was 8

22 seconds remaining
Question 4:
6 - 22 = _
-18
Incorrect : (
The answer was -16
Time has elapsed
____________________________________________________________________
You reached question 4
Correct responses: 1
Incorrect responses: 3
Would you like to play again (y/n)
n

Last edited on
> This assignment will be due November 9th
Wow - makes a change from all the "help ASAP, I've got 6 hours to go" posters.

A good place to start is re-print your assignment with each simple sentence on a single line (double spaced). You want room to write thoughts about each one.

So anyway, you've posted your assignment, what is it that's actually confusing you?

Start with
1
2
3
a = rand() % 10;
b = rand() % 10;
cout << "What is " << a << "+" << b;



The timed input is harder, and unfortunately specific to your OS/Compiler.
So say what you have for better guidance in that direction.


> Additional points may be earned by completing any of the following:
Ignore EVERYTHING after this sentence.
It will only distract you.
I believe threading would avoid needing an OS specific I/O toy for the timed input.
Last edited on
Topic archived. No new replies allowed.