Problem 1158. Sum the elements in either diagonal of a square matrix

Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part of either of the diagonals).

Solution Stats

34.5% Correct | 65.5% Incorrect
Last Solution submitted on Dec 17, 2019

Problem Comments

Solution Comments