Share
Explore BrainMass

Program that reads a 5 x 5 two-dimensional array of integers

Write a program that reads a 5 x 5 two-dimensional array of integers and then prints the row sums and the column sums:

Enter row 1: 8 3 9 0 10
Enter row 2: 3 5 17 1 1
Enter row 3: 2 8 6 23 1
Enter row 4: 15 7 3 2 9
Enter row 5: 6 14 2 6 0

Row Totals:
Column Totals:

You may either initialize this array within the program or have the user type in the values at run time.

Solution Summary

This solution provides a program that reads and prints arrays.

$2.19