Challenge: Matrix Sum
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 4. Capítulo 4
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Awesome!
Completion rate improved to 3.57
Challenge: Matrix Sum
Deslize para mostrar o menu
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 4. Capítulo 4
single