Question: *****************************The program is C++***************************** Some magic square recognizer functions failed to check that the numbers in the magic square were unique. It should be possible
*****************************The program is C++*****************************
Some magic square recognizer functions failed to check that the numbers in the magic square were unique. It should be possible generate a n x n 2d array or vector in which the number in structure range between 1 and n^2 and the sum of the numbers in each row, each column, and each diagonal equals n x (n^2 + 1) / 2 but at least one number appears more than once in the array or vector. Let us call this kind of structure a pseudo magic square.
Write 2 functions - one that generates a pseudo magic square and one that recognizes a structure as a pseudo magic square.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
