Question: the code is required in C++ Description of Problem - A magic square is a 2-dimensional array of positive integers, which has the following characteristics:

 the code is required in C++ Description of Problem - A

magic square is a 2-dimensional array of positive integers, which has the

the code is required in C++

Description of Problem - A magic square is a 2-dimensional array of positive integers, which has the following characteristics: . The numbers of rows equals the number of columns . All entries must be positive integers e The sum of all the entries in each row, each column, and the two diagonals are identical In a 2-dimensional array, one diagonal goes from the upper left corner to the lower right corner. The other diagonal goes from the lower left corner to the upper right corner. See the diagram on the following page. Task to perform 1. Populate the array displayed on the following page. 2. Do the Sums for all columns, rows, and diagonals. There will be 8 sums altogether 3. Display all the results. Make sure to identify where the sum was located. Example "Sum of 1st row 4. Multiply the 2nd column of numbers by 4 5. Subtract 3 from the center number 6. Add 3 to the last number in the last row 7. Do the Sums again for all columns, rows, and diagonals 8. Display all the results agairn 9. Draw out the results of the Magic Square 10. Answer the following question. Is the sum of the 2nd column greater than, less than, or equal to the sum of the top left to bottom right diagonal

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!