Ok so I got a good chuck of the project done I am just having trouble get this idea into the project.
Phase III: Now you will change your doOneSet function so that it will work for either addition, subtraction, or multiplication. For the purposes of this assignment, a set of problems is defined to be a group of problems that are all of the same type (all addition, all subtraction, or all multiplication). After completing this phase your program will give 5 addition problems, 5 subtraction problems, and 5 multiplication problems, for a total of 15 problems. Your main function must look exactly like this:
int main()
{
srand(time(0));
doOneSet('+');
doOneSet('-');
doOneSet('*');
}
So I am not sure how I am suppose to get the "+" to change to "-" or to a "*". and my doOneSet() can only have 3 arguments inside of it. I know I have only 2 right now and then when it switches to "*" or "-" by itself it should also state "Set 2" instead of "Set 1" then "Set 3" for the next one any ideas?
I would just have a check inside the function that, based on what the operator is (plus, minus, etc.), it calculates the answer differently. That's all you'd really need to do. Just pass another parameter for the operator you want to practice on.
I'm having the same problem. Would you please be able to explain what you mean when you wrote "Just pass another parameter for the operator you want to practice on." Are you able to show me an example?
Thank you.