i have a list of students scores in 7 different subjects stored into a multidimensional array. the following code stores the scores into the array but what would be best way to add up values in each row to find average of each row then average of each column.
Average score on a specific test: loop through columns (the test scores) loop through students
Each student's average score: loop through students loop through columns (scores)
Notice that the outer loop is looping over the major piece of information (whether the average is for a student or a test), while the inner loop runs over the minor piece of information (all the scores for that student or test).
Unless you are just going to print the average to the display immediately, you'll probably want a couple of arrays to hold the row/column sums.