I need array help!

For the love of all that is codie I can not figure out a simple way to put this chuck of info into an array.
Divers Difficulty Scores
---------------------------------------------------------------------

7
Anne 2.0 8.5 8.5 9.0 9.0 9.0 9.5 8.5 8.0 9.5
Sarah 1.6 7.5 8.5 8.0 8.0 7.0 9.0 8.5 8.5 8.0
Deborah 2.3 9.0 9.0 9.5 10.0 10.0 9.5 9.5 9.5 9.5
Kathryn 2.4 9.0 9.0 9.0 9.5 9.5 9.5 9.0 8.0 8.5
Martha 2.7 9.0 9.0 9.5 9.5 9.0 8.5 8.5 8.5 9.5
Elizabeth 2.9 8.0 8.0 7.5 8.5 8.5 8.0 8.0 7.5 8.5
Tina 2.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5

Has to be all 1d arrays and when all send and done i have to be able to sort the scores into a low high order and add them up, times by the difficulty and get the points earned. points dont have to be in an array.

The 7 stands for number of divers can can be used to set the number of row ;P

Any ideas would be lovely!!!

Thank you!!

P.S. My idea was to just Fin everything and hand give it slots in an array, but there has to be an easier way. The string at the front is what is killing me from just netted for looping everything in and calling it a day....

Are you allowed to use the Standard Template Library at all?
we have only used cmath, string, iostream, fstream, and iomanip in class.
Ok, so do you have to rank all the divers or do you just have to get points seperately for each diver?
I just have to sort the scores, drop the first and last one then add them, multiply by the difficulty and that gets me the total points.

At the end i have to print the name of the person with the highiest overall score.
You can make a program that first reads in the number of divers, then you go into a loop for that many times.

You should also have variables outside your loop for name and max score.
You could also have a sorting function and a score function to keep it neat.
So in each loop you parse the name, and then all the scores into the array.
Then you call the sorting function on your array, and then calculate the score on the array.
You can compare the calculated score to the max score, and if it is higher, store the name and the new max score.

and after your loop is over, you have your answer ready to print.
Thanks
Topic archived. No new replies allowed.