Question: Language is C++. Please help. Thank you! 15. (2D array) Declare a 2D array to represent the setup of a magic square (as illustrated below).
Language is C++. Please help. Thank you!
15. (2D array) Declare a 2D array to represent the setup of a magic square (as illustrated below). Write a function that test whether the property of magic square is satisfied for a given 2D array. The sum of the three numbers of each row (each column, and the two diaognal lines) should be same, and all numbers are distinct. 2 7 6 15 9 5 115 4 3 8 15 15 15 15 15 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
