Hey everyone, used this site for a while and its really helped me a lot. However, i'm struggling to figure this out. I can't get the function "ratethegroup" to work! It just isnt printing anything correctly. Thank you in advance..
It's all on the codepad, function is near the bottom of the program as "ratethegroup". This is it though, thank you very much. I can't get it to work! It doesn't print the right numbers when i enter them. Thank you!
void ratethegroup (int ScoreOne, int ScoreTwo, int ScoreThree, int TotalScore)
{
2) Can you be more specific about your problem? What values are you inputting? What output are you getting? In what way is the output not what you expect?
Help us to help you by being as precise and complete as possible.
EDIT:
3) One thing I can see is that the value of TotalScore that gets passed into ratethegroup() is always going to be 0. You pass a zero into classify(), and nothing changes it before it gets passed into ratethegroup().
I would store the scores in an array so you can access them with loops.
Looking at the code, scores fall into the following "bands":
0-500
501-700
701-799
800
I'd write a function that takes a score and returns the band that it's in (as an enum if you've learned about that those, or just a number 0-3 if you haven't).
Then to rate the group, get the band for each score and count the number of scores in each band. You can use this to determine the rate.