Submitted by moazkhan on Thursday, July 17, 2014 - 21:45.

#include<stdio.h> #include<conio.h>

int main() { int matrix1[100][100] = { 0 }, matrix2[100][100] = { 0 }, matrix_ans[100][100] = { 0 }; int r1, c1, r2, c2; int i, j, k;

if (c1 == r2) { for (i = 0; i < r1; i++) { for (j = 0; j < c1; j++) { } } for (i = 0; i < r2; i++) { for (j = 0; j < c2; j++) { } } for (i = 0; i < r1; i++) { for (j = 0; j < c2; j++) { matrix_ans[i][j] = 0; for (k = 0; k < c1; k++) { matrix_ans[i][j] = matrix_ans[i][j] + (matrix1[i][k] *matrix2[k][j]); } } } } }

else return 0; }

- 39 views