matrix competencies

Do these as an applet using a class basic matrix operations

  1. Write a program that randomly fills a 3 by 4 by 6 array, then prints the largest and smallest values in the array.
  2.  

 


Matrix Addition

 

3.

Magic squares are squares that contain numbers arranged in such a way that all the rows columns and the two diagonals add up to the same number.

Here is an example of a magic square of size 3:

6 1 8
7 5 3
2 9 4

and an example of a magic square of size 5:

 

15 8 1 24 17
16 14 7 5 23
22 20 13 6 4
3 21 19 12 10
9 2 25 18 11