Question: C++ Write a function that takes a 4x4 array as a parameter and returns true if the array is a magic square, but returns false
C++ Write a function that takes a 4x4 array as a parameter and returns true if the array is a magic square, but returns false otherwise. An array is a magic square if each of its rows, columns, and main diagonals sum to the same value. For example, the following is a magic square in which each row, column, and main diagonal sums to 100.
30 16 18 36 10 44 22 24 32 14 20 34 28 26 40 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
