Abschnitt 1. Kapitel 25
single
Challenge: Matrix Sum
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 25
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen