Get comprehensive solutions to your questions with the help of IDNLearn.com's experts. Discover thorough and trustworthy answers from our community of knowledgeable professionals, tailored to meet your specific needs.

Write a function magicCheck that takes a one-dimensional array of size 16, a two-dimensional array of four rows and four columns, and the sizes of the arrays as parameters. By adding all the elements of the one-dimensional array and dividing by 4, this function determines the magicNumber. The function then adds each row, each column, and each diagonal of the two-dimensional array and compares each sum with the magic number. If the sum of each row, each column, and each diagonal is equal to the magicNumber, the function outputs ‘‘It is a magic square’’. Otherwise, it outputs ‘‘It is not a magic number’’. Do not print the sum of each row, each column, and the diagonals.

End