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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!