You will create a math game to help people hone their math skills. When the game
ID: 3802383 • Letter: Y
Question
You will create a math game to help people hone their math skills. When the game is executed, it will ask the user if they want to practice their addition, subtraction, multiplication or division skills. Once a skill is selected, the user is asked for a range of numbers they wish to practice. As an example, I can input a "-" to practice subtraction. I then can input the numbers 10 and 20 to practice subtraction using numbers between 10 and 20 inclusive of 10 and 20.
All numbers must be positive integers. All subtraction problems must result in positive answers and all division problems must result in answers with a zero remainder.
The user should get one point for every correct answer and get one point deducted for every incorrect answer. The screen should turn green for every correct answer and should turn red for every incorrect answer. For any incorrect answer the program shall display the problem with the correct answer before moving to then problem. The number of points should be displayed on the screen at all times.
The three high scores (calculated by taking the number of correct answers divided by the elapsed time, correct problems per second) for each type of math operation should be stored in an external file. When someone creates a new high score and has chosen to exit the program, the program should ask the user for a user name. Then the high scores and user names must be displayed for 5 seconds before exiting the program. If the user hasn't beat one of the three high scores, the existing high scores and user names should be displayed for 5 seconds before exiting the program.
Programming in C++
Explanation / Answer
I think you are stuck because you are being overwhelmed by the whole assignment. You need to start with a simpler program. You should have learned this way before arriving at your final assignment. Have you been getting people to do ALL your assignments? If so, how do you expect to pass the final exam.
Here is a smaller assignment for you to work on:
Ask the user if they want to practice their addition, subtraction, multiplication or division skills.
That's all you have to do. Can you do that much? If so, show us.
However, maybe you just have no intention of attempting to do the assignment. Maybe you just want us to help to cheat by just doing the whole thing for you. That is NOT the purpose of this forum.
If you want help, we will help, but you have to do most of the work. It's YOUR assignment.
First break each task into a method. Remember "Divide and Conquer."
method_1{ prompt user for addition, subtraction, multiplication, division}
method_2{prompt user range of numbers}
method_3{ check for positive integers only}
method_4{if subtraction, ensure positive result, if division result must be zero remainder}
method_5{ if correct +1 to total and screen green, if incorrect -1 from total and screen red, }
See where I'm going with this? You may call a method from a method or maybe combine some of these.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.