Question: Write a C++ function that takes a two dimensional dynamic array (matrix) and its sizes and returns true if the matrix is a lower matrix

Write a C++ function that takes a two dimensional dynamic array (matrix) and its sizes and returns true if the matrix is a lower matrix and returns false otherwise. Remark: A matrix M is lower matrix if it is a square matrix (row size = column size) and every element M[i][j] = 0 for all i < j. That is all the elements of the matrix above the main diagonal are zero. Other elements don't matter.

Can you help me to solve this problem?

(Just using function and then testing in the main program. Please, do not use defined functions in the C++ library.)

Thank you so much.

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 Programming Questions!