Sectionย 1. Chapterย 25
single
Challenge: Matrix Sum
Swipe to show menu
Task
Swipe to start coding
Write a program that calculates the sum of all elements in a 2D integer array and prints the result.
- Iterate through each row of the
matrixparameter. - For each row, iterate through each column.
- Add each element to a running total.
- Return the total sum.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 25
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat