Print the sum of diagonal elements of a matrix. Take input from the user.