Write a function that sums all the numbers of the major diagonal in an matrix of integers using the following header:def sumMajorDiagonal(m):The major diagonal is the diagonal that runs from the top left corner to the bottomright corner in the square matrix. Write a test program that reads a matrix anddisplays the sum of all its elements on the major diagonal. Here is a sample run