用c語言實現(xiàn)兩個矩陣相乘怎么做?
matrix_mul(int **A, int **B, int **C, int m, int p, int n) { for (int i = 0; i < m; i++) { for (int j = 0; j < p; j++) { C[i][j] = 0; for (int k = 0; k < n; k++) { C[i][j] += A[i][k] * B[k][j]; } } } }
用c語言實現(xiàn)兩個矩陣相乘怎么做?
matrix_mul(int **A, int **B, int **C, int m, int p, int n) { for (int i = 0; i < m; i++) { for (int j = 0; j < p; j++) { C[i][j] = 0; for (int k = 0; k < n; k++) { C[i][j] += A[i][k] * B[k][j]; } } } }