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
---------------------------------------------------------------------
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....
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.