This program is intended to help you gain some experience using arrays in SAL.
Write a SAL program that reads in a value for the number of rows in a square array of integers. If the number of rows is size, the program should next read size*size integers into the array (one integer per line). Have the program echo print the array as a size-by-size table of integers.
If the values in every row, every column and both major diagonals each sum to the same value, print:
The array is a magic square.
Otherwise print:
The array is NOT a magic square.
Size? 3 Enter 9 integers: integer 1? 8 integer 2? 1 integer 3? 6 integer 4? 3 integer 5? 5 integer 6? 7 integer 7? 4 integer 8? 9 integer 9? 2 The array is: 8 1 6 3 5 7 4 9 2 The array is a magic square.
You must "hand in" your program (the SAL source code) to the computer directly by
cp p3.s ~cs354-1/handin/username/P3/.
just once, where "p3.s" is the name of the file containing your SAL source code. No printouts will be turned in. I will run your program several times using different test data.