Explore BrainMass

Identity matrix in C++

Write a function in c++
Isidentity (t)
t is two dimensional array.
(int t[rwos] [columns]
return true, if it is an identity matrix,
return false if it is not
like example
square tolls colum
all 1's on principal diagonal, otherwise 0's
1 0 0
0 1 0
0 0 1

Note: This is a c++ question. This is not a math questions.

Solution Preview

I understand from your formulation of the question that t[][] is an N-by-N array, that N is a pre-defined constant and that you are not ...