Fill in diagonalSum so that it returns the sum of the main diagonal — the elements where the row number equals the column number.
diagonalSum
For the 3×3 grid the diagonal is 1, 5, 9, so the program prints 15. One loop is enough, not two.
15