Question: C++ Program 1. Prompt the user to enter the size of the square such as N. N must be greater than or equal to 2

C++ Program

1. Prompt the user to enter the size of the square such as N. N must be greater than or equal to 2 and less than or equal to 10.

2. create an array of size N x N.

3. use the fucntion to popuate the array with distinct random numbers that are between 1 - 100.

4. use a function to determine whether the numbers in N x N are magic square numbers.

5. repeat steps 1 - 4 until the user termiates the program.

Magic Number : n(n2 + 1) / 2

the program must have rows and colums that all equate to the sum of 15 for example

8 1 6 = 15

3 5 7 = 15

4 9 2 = 15

ask the user if he would like to enter another magic square and compute the same way. (Y/N)

this is a sample report of the output

C++ Program 1. Prompt the user to enter the size of the

square such as N. N must be greater than or equal to

2 and less than or equal to 10. 2. create an arrayof size N x N. 3. use the fucntion to popuate the

array with distinct random numbers that are between 1 - 100. 4.

Welcome to my magic sequence program The function of the program is to 1, Allow the user to enter the size of the magic square such as N . N>= 2 and

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!