Question: 1. Please Use c++ language and run the code before you pose please @visual studio. Thanks Magic Square Extend your Magic Square program, Your program

1. Please Use c++ language and run the code before you pose please @visual studio. Thanks

Magic Square Extend your Magic Square program, Your program should 1. Create a constant variable DIMENSION and a two-dimensional array with DIMENSION rows and columns 2. Input values for elements of the array 3. Compute the magic number (expected sum of each row, column, and diagonal) as follows:

(sum of 1 through DIMENSION x DIMENSION) / DIMENSION

4. Determine if the square is magic Your program must work for any DIMENSION > 2. For example, if DIMENSION is 4, the user must enter16 unique integers between 1 and 16. The magic number is (1 + 2 + 3 + ... + 16) / 4 = 34. Your program must have two functions: 1. Input values of the magic square, validate inputs, and pass inputs to the main program using reference parameters 2. Compute sums of rows, columns, and diagonals and pass sums to main program using reference parameters

====================================================================================================================================

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!