http://ideone.com/GKxcj
this is my code. I have a question about the output so when i tried to print output to file it show me this ouput :
http://codepad.org/LvaboydT
as you can see from this output that the total column was repeated for every line why is this happen the calcdata function seems good to me. If something was wrong in the caldata function can anyone explain what was wrong to me ?
thanks
http://ideone.com/GKxcj this is my code. I have a question about the output so when
Share
I go through your code and one thing seems to be weird. If i understand clearly, each table correspond to a skater.
For each row you have a base, some score and a total score.
In your print function we can clearly see that:
skater[i].baseval[j] print the base val for skater i and row j
Then the score list is displayed with skater[i].score[j][k] where k is the score index in the array.
However when printing the total score you display skater[i].total_score which is a unique value. So it is normal that is the same for each row of the table for one given skater.
If you want a total score for each row, you just have to transform skater[i].total_score to an array then compute the total score and add it to the righ row (like you did for the base score)
Edit: changed wrong variable name
Regards