Intel Corporation Interview Question

write a program that checks if a matrix is a magic square