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

Created by Tom Holz in Community

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

35.31% Correct | 64.69% Incorrect
Last solution submitted on Apr 20, 2019

Problem Comments

Solution Comments