#include #include #define MAX_SIZE 100 int magic_square(int size, int array[MAX_SIZE][MAX_SIZE]); // This is a simple main function which could be used // to test your magic_square function. // It will not be marked. // Only your magic_square function will be marked. int main(void) { // In the below sample test_array, the sum of each row, // column and diagonal is 65. If you change the array, // the sums will change as well. int test_array[MAX_SIZE][MAX_SIZE] = { {11, 24, 7, 20, 3}, { 4, 12, 25, 8, 16}, {17, 5, 13, 21, 9}, {10, 18, 1, 14, 22}, {23, 6, 19, 2, 15} }; int size = 5; if (magic_square(size, test_array) != 0) { printf("You have a magic square.\n"); } else { printf("You do not have a magic square.\n"); } return 0; } // Is a magic square if sum of rows, columns and diagonals all equal // returns this sum if it is a magic square // returns 0 otherwise int magic_square(int size, int array[MAX_SIZE][MAX_SIZE]) { // PUT YOUR CODE HERE (change the next line!) return -1; }