Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are not part of ...
1.Input the size of the matrix n (i.e., the matrix will be n x n). 2.Create an empty matrix list. 3.Repeat n times to input the matrix: For each iteration: Input a row of n integers. Convert the input ...