Question: TASK 4 : Determine magic square classification ( 1 0 2 0 min ) Determine if the matrix is a form of magic square. Each

TASK 4: Determine magic square classification (1020 min)
Determine if the matrix is a form of magic square. Each criterion below defines a classification of magic square. If none of the criteria are met, produce a warning informing the user that they have not entered a magic square, and ask the user if they wish to try entering a new matrix. Rerun the entire program if the user chooses to enter a new matrix.
Determine the classification of the magic square using the following requirements:
1. If each row and column sum to the same value (the magic constant), the magic square is classified as semi-magic
2. If, in addition to criterion 1, both diagonals sum to the same value as the rows and columns, the magic square is classified as normal
3. If, in addition to criteria 1 and 2, the values in the square are only the sequence of numbers from 1 to (for example, the values in a 3x3 square would be 1:9, and for a 4x4 square would be 1:16), the magic square is classified as perfectTASK 4: Determine magic square classification (1020 min)
Determine if the matrix is a form of magic square. Each criterion below defines a classification of magic square. If none of the criteria are met, produce a warning informing the user that they have not entered a magic square, and ask the user if they wish to try entering a new matrix. Rerun the entire program if the user chooses to enter a new matrix.
Determine the classification of the magic square using the following requirements:
1. If each row and column sum to the same value (the magic constant), the magic square is classified as semi-magic
2. If, in addition to criterion 1, both diagonals sum to the same value as the rows and columns, the magic square is classified as normal
3. If, in addition to criteria 1 and 2, the values in the square are only the sequence of numbers from 1 to (for example, the values in a 3x3 square would be 1:9, and for a 4x4 square would be 1:16), the magic square is classified as perfect

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 Programming Questions!