#include<stdio.h> #include<stdlib.h> int main() { int a[10][10], b[10][10], c[10][10]; int r1, c1, r2, c2, i, j, k; printf("\nEnter rows and cols of Matrix A: "); scanf("%d %d", &r1, &c1); printf("\nEnter rows and cols of Matrix B: "); scanf("%d %d", &r2, &c2); if(c1 != r2) { printf("\nMatrix multiplication not possible"); exit(0); } printf("\nEnter elements of Matrix A:\n"); for(i = 0; i < r1; i++) { for(j = 0; j < c1; j++) { scanf("%d", &a[i][j]); } } printf("\nEnter elements of Matrix B:\n"); for(i = 0; i < r2; i++) { ...
Comments
Post a Comment