Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

What's the best way to calculate the average for the columns in a 2D-array and return it to a 1D-array.

OpenStudy (anonymous):

Something like this in c: for(col = 0; col < Number of Columns; col++) { for row = 0; row < Number of Rows; row++) { testSum += scores[row][col]; } testAvg = testSum / Number of Rows (which is the number who took the test). //do something with this testAvg. totalAvg = testAvg; //makes a running average. testAvg = testSum = 0; //reset for the next test average. }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!