| 9 | static int SIZE = 30; |
| 10 | |
| 11 | public static void main(String args[]) { |
| 12 | int n = Integer.parseInt(args[0]); |
| 13 | int m1[][] = mkmatrix(SIZE, SIZE); |
| 14 | int m2[][] = mkmatrix(SIZE, SIZE); |
| 15 | int mm[][] = new int[SIZE][SIZE]; |
| 16 | for (int i=0; i<n; i++) { |
| 17 | mmult(SIZE, SIZE, m1, m2, mm); |
| 18 | } |
| 19 | System.out.print(mm[0][0]); |
| 20 | System.out.print(" "); |
| 21 | System.out.print(mm[2][3]); |
| 22 | System.out.print(" "); |
| 23 | System.out.print(mm[3][2]); |
| 24 | System.out.print(" "); |
| 25 | System.out.println(mm[4][4]); |
| 26 | } |
| 27 | |
| 28 | public static int[][] mkmatrix (int rows, int cols) { |
| 29 | int count = 1; |