Question: USING JAVASCRIPT AND BUTTON ONCLICK IN THE BODY - A magic square is a two - dimensional array of positive integers in which the fol

USING JAVASCRIPT AND BUTTON ONCLICK IN THE BODY - A magic square is a two-dimensional array of positive integers in which the fol-
lowing is true:
The number of rows equals the number of columns.
Every row, column, and the two diagonals add up to the same number.
Create a web page with a table that has four rows and four columns. Allow the
user to enter values for each cell. Store these values in a two-dimensional array
named magic and determine if it is a magic square.
Note: if we call the array magic then the sums of the two diagonals are as follows:
diagonal2=magic[0][3]+magic[1][2]+magic[2][1]+magic[3][0];
Save the page with the filename magic. htm 1 and submit your work as
instructed by your teacher.
USING JAVASCRIPT AND BUTTON ONCLICK IN THE BODY -

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!