This looks like homework, but let's see if we can find a pattern and you can take it from there...

There are two diagonals (which make an X through the matrix), the elements of the first diagonal are (row,col):

0,0 : 1,1 : 2,2 : 3,3

That one is easy (and you already check for that one)

The second diagonal is:

3,0 : 2,1 : 1,2 : 0,3

Do you see the pattern? Do you see that you are missing a check?

15,795,318 members