Question: In this exercise, the main code passes to the checkMatrix function a 2.dimensional array of integer numbers First, the CheckMatrix function checks if the array

 In this exercise, the main code passes to the checkMatrix function

In this exercise, the main code passes to the checkMatrix function a 2.dimensional array of integer numbers First, the CheckMatrix function checks if the array represents a square matrice number of rows equals number of columns) If the array is not square the furiction prints "NONE" and exits. Second, if the array is square, the function checks if it is diagonal or not. A suare matris diagonal when all elements other than the diagonal elements are zero. For example, the following matricina diagonal matric 300 020 S if the array is digortal the function prints 1 otherwise itprints Third, the function check the array o Astala matres a diagonal matrix with equivalent diagonal elements. For some the following mataascar matra 200

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!