Middle matrix sums


Given an integer matrix, m, with an odd # dimensions, n x n, (e.g 3 x 3, 5 x 5, etc), find the sum of middle row as well as the middle column.

For example:


#Your program would output:
'Sum middle row =' 15 #(e.g. 4+5+6)
'Sum middle column =' 15 #(e.g. 2+5+8)


Access restricted

Subscribe to premium account to see the solution.

Get premium now