Magic Square Matrix Two Dimensional Arrays Sum Row Sum Column Sum Main Diagonal Sum Revers Q37255467

A magic square is a matrix (two dimensional arrays) in which thesum of each row, sum of each column, sum of the main diagonal, andsum of the reverse diagonal are all the same value.

You are to code a program to determine if a giventwo-dimensional array (that will be read in from a file) is a magicsquare or not. The functions you will need to code are asfollows:

Code a function/method for each of the following:

  • Read data into the matrix

  • Print the matrix on the screen

  • Sum a row given the index for that row

  • Sum a column given the index for that column

  • Sum the

    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.