Meta Interview Question

How to find and print the diagonal elements in a matrix