Question: C++ (Lo Shu Magic Square) A Lo Shu Magic Square is a 3 by 3 grid. The grid contains the numbers 1 through 9, inclusive.

C++ (Lo Shu Magic Square)

A Lo Shu Magic Square is a 3 by 3 grid. The grid contains the numbers 1 through 9, inclusive. There may not be duplicate numbers. To qualify as a magic square, each row, column and diagonal must add up to the same number. In this example, that number is 15, but it can be any number as long as they all add up to the same number. You can simulate a magic square by using a 2 dimensional array. Design a program which initializes a 2 dimensional array with values entered by the client. Remember, the client cannot enter duplicate numbers, 1 - 9 inclusive only! Your program should then determine if the values entered is a 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!