Question: Please write code in C programming Relevant Programming Concepts: Two-D Arrays Functions 1 Magic Square A magic square is an arrangement of positive integers in
Please write code in C programming

Relevant Programming Concepts: Two-D Arrays Functions 1 Magic Square A magic square is an arrangement of positive integers in a two-dimensional array such that the sum of the elements of the array by row, by column and by the two diagonals amount to the same value. Write a C program that checks whether a two-dimensional array of size 6x6 is a magic square. Your program should Read the values of the magic square from a file array.txt using the following function prototype void read ar (FILE in, int xl 1 [6]); Check whether the square is a magic square, and print the result on the screen . Print the magic number (sum of each row, column, and diagonals) if that number exists An example of a magic square 6 323 34 35 1 7 11 27 28 8 30 19 14 16 15 23 24 18 20 22 21 17 13 25 29 10 926 12 36 5 33 4 2 31 Sample code execution #1: This is a magic square. The magic number is: 111 Sample code execution #2: First, change one element such as change the first element from 6 to 3 in the text file. This is NOT a magic square
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
