Hey everyone so I'm completely stuck on a assignment of mine. First let me say that I'm not expecting anyone to just give me a solution, just some help finding that solution.
My problem is this. I will be given a random number that will represent the average score of a player. What I am suppose to do is determine what is the minimum number of times that player had to play to get that average score. THe input has to be able to handle up to 4 digits after the decimal. I believe he got this from a programming competition question cause it sounds like one.
So basically I need to create a program so that it prompts the user to enter a number(Average) then the program will output the minimum number of times to get that average.
I'll be honest I am not the greatest with math so I am having trouble coming up with a way to solve this assignment question.
Been looking on competition websites since it sounded like one and have finally found the question. It can be found here http://www.spoj.com/problems/GAMES/.
My professors made some tweaks in the assignment though.
The scores can be of unsigned integer value only
His input will be between
1 <= avg <= 1000000 with a maximum of 4 digits after decimal place.
Which is the same as the spoj question. Quite weird I wonder if professors borrow a lot of them assignment questions from competition questions lol.
Not sure If I am going in the right direction or the completely wrong direction (Sorry I am horrible with math), but that lowest number of times would be the reduced denominator of the decimal? So in the case of 10.25 it would be 4? And 15.33 would be 3?