Question: Call a function to find the sum of each column.Write a function that will sum the major diagonal called sumMajorDiagonal . The sum should be
Call a function to find the sum of each column.Write a function that will sum the major diagonal called sumMajorDiagonal
. The sum should be displayed from the main function, not from the function sumMajorDiagnoal.
The size of an array cannot be changed based on user input (dynamic memory allocation), so the matrix should be dimensionsed to the max size ever expected (10 x 10 perhaps). Prompt user to enter N (the size of the N x N matrix). The program should work for any N 2. N should not be used anywhere for matrix dimensions. It is only used in for loops to control user input and printing. Note that a 3x3 matrix is really just using the upper corner of the 10x10 matrix. Prompt the user to enter the elements in the matrix row-by-row. Display the NxN matrix
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
