The Lo Shu Magic Square is a grid with 3 rows and 3 columns.

See: https//en.wikipedia.org/wiki/Lo_Shu_Square

It has the following properties:

1. The grid contains all the numbers 1 through 9 exactly once.

2. The numbers of each row, each column, and each diagonal all add up to the same number.

In a program, you can simulate a 3x3 magic square using two-dimensional array. Write a program that accepts the 9 numbers in the 3x3 grid from the user and passes those to a function using a two-dimensional array. The function will check whether it fits the description of a Lo Shu Magic Square and return true if it does, false otherwise. The program should inform the user of the results and ask the user whether he wishes to continue with another square.

This is what your output should look like:

Please enter your solution to the Lo Shu Magic Square:

Row 1: 1 9 3
Row 2: 5 8 4
Row 3: 2 6 7

Sorry, this is not a Lo Shu Magic Square.

Continue (y/n)? y

Row 1:
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.