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).
the description of your problem is wrong, not the same as test suits. the either..or... should be both...and...
I updated the description to clarify the ambiguity mentioned by Gareth Lee on 1 May 2015.
With apologies for the 2 year delay, I've updated the description to be a little more explicit.
I hadn't seen this approach to masking the complexity of a solution before. Obvious in hindsight of course.
1527 Solvers
Find the "ordinary" or Euclidean distance between A and Z
119 Solvers
Solve the set of simultaneous linear equations
171 Solvers
Change the sign of even index entries of the reversed vector
212 Solvers
Multiples of a Number in a Given Range
140 Solvers