Question: getRow Total: Function returns the sum of the specified row. Consists of 5 arguments, the array, its dimension, the specific row and the sum of

getRow Total: Function returns the sum of the specified row. Consists of 5 arguments, the array, its dimension, the specific row and the sum of the row. II. getColTotal: Function returns the sum of the specified column. It consists of 5 arguments, the array, its dimension, the column specific and the sum of the column. iii.getDiagLeft Total: Function returns the sum of the diagonal. It consists of 4 arguments, the array, its dimension, and the sum of the diagonal that starts at the upper left corner and ends at the extreme lower right. iv. getDiagRight Total: Function returns the sum of the diagonal. It consists of 4 arguments, the array, its dimension, and the sum of the diagonal that starts at the top right and ends at the bottom left. | V. Build a main program that performs the verification using said functions. 3. Lo Sha Magic Square The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown in Figure 7-19. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 through 9 exactly. The sum of each row, cach column, and each diagonal all add up to the same number. This is shown in Figure 7-20, In a program you can simulate a magic square using a two-dimensional array. Write a function that accepts a two-dimensional array as an argument, and determines whether the array is a Lo Shu Magic Square. Test the function in a program. Figure 7-19 4 9 2 3 5 7 8 1 6 Figure 7.20 15 4 9 2 1 15 5 7 -15 1 6 -15 15 15 15 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
