Write a program that creates a 3x3 2d array and populate it by user input. It then creates a second array of size 3 which stores the sum of each row in the user input matrix. If the matrix is [ [1,1,1], [2,2,2], [3,3,3] ], sums should be [3, 6, 9]. The sums are then printed on the screen.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

Write a program that creates a 3x3 2d array and populate it by user input. It then creates a second
array of size 3 which stores the sum of each row in the user input matrix.
If the matrix is [ [1,1,1], [2,2,2], [3,3,3] ], sums should be [3, 6, 9].
The sums are then printed on the screen.

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage