Java programming those things 51-multi-dimensional array exercises Zhengzhou game college Chen yuefeng from: http://blog.csdn.net/mailbomb
6.7 array Comprehensive Exercises1. Calculate the product matrix C of two matrices A and B. Matrix A = {1, 2, 4, 5, 6}; matrix B = {7, 8, 9, 10, 11, 12 }. The product of the two matrices is still a matrix. If matrix A has m row p columns and matrix B has P row n columns, their product C matrix has m row n columns. C = a * B algorithm: CIJ = (I = 0, 1 ,......, M-1; j = ,......, N-1) let a, B, and C matrix be represented by three 2-dimensional arrays: array A has three rows and two columns, and array B has two rows and three columns, the C array has three rows and three columns. For example: c [0] [0] = A [0] [0] * B [0] [0] + A [0] [1] * B [1] [0]; c [1] [0] = A [1] [0] * B [0] [1] + A [1] [1] * B [1] [1]; 2. Calculate and output the nxn matrix. (N> 0) For example, the 4x4 snake matrix is as follows: 1 3 4 10 2 5 9 11 6 8 12 15 7 13 14 163, fill a 3x3 array with the 9 numbers 1-9, and output all possible situations. Note: I hope you will make some suggestions.