Exercise 2 - Numbers square
Exercise Objectives
? Passing 2-D Arrays to functions
Problem Description
Inside "Lab11" folder, create a project named "Lab11Ex2". Use this project to write and run a C program
that performs the following:
• Create a 3 x 3 2-D Integer array named square.
• Fill the array with the following numbers:
10 17 12
15 13 11
14 9 16
• Pass the square array to a function named magic, which checks and returns a result to indicate
that the passed square is a magic square or not. A Magic Square is the square in which the sum
of all its rows, columns, and diagonals (Main and secondary diagonals) is the same.
Sample Output (Assuming that the shown characters are randomly generated)
Enter the order of the array
Fill the array with the following numbers:
10 17 12
15 13 11
14 9 16
It is a magic square array!!