Computers and Technology

Write a program that uses a 3 3 3 array and randomly place each integer from 1 to 9 into the nine squares. the program calculates the magic number by adding all the numbers in the array and then divid- ing the sum by 3. the 3 3 3 array is a magic square if the sum of each row, each column, and each diagonal is equal to the magic number. your program must contain at least the following functions: a function to randomly fill the array with the numbers and a function to deter- mine if the array is a magic square. run these functions for some large number of times, say 1,000, 10,000, or 1,000,000, and see the number of times the array is a magic square.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:30, donmak3833
Agood flowchart alludes to both the inputs and outputs you will need to receive and give to the user. true or false?
Answers: 3
image
Computers and Technology, 22.06.2019 09:00, sabahfayaskhan
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
image
Computers and Technology, 22.06.2019 20:00, ksanchez2100
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
image
Computers and Technology, 23.06.2019 04:00, china236
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
Do you know the correct answer?
Write a program that uses a 3 3 3 array and randomly place each integer from 1 to 9 into the nine sq...

Questions in other subjects:

Konu
Mathematics, 14.12.2021 09:20