This Algorithm was made for print (or use/check) a diagonal of a Matrix.
I was implementing a 4-in-a-row game and I would like to do a score checker in the diagonal (if there are 4 same elements in the diagonal of a 10x10 matrix in a row the player wins).
So this Algorithm can be implemented in multiple ways as a Matrix Diagonal Checker changing the print for any other function.