123 Eng

### Engineering the engineers™

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

Computer Science / IT
Electronics
Electrical
Mechanical
Chemical
Civil

CAT / MBA

GMAT / Foreign MBA
Latest Jobs

Displaying  Source Code(s)

 Program to Multiply Two Matrices. -------------------------------------------------------------------------------- #define MAXROWS 30 #define MAXCOLS 30 void readinput(int a[][MAXCOLS],int m,int n); void computeproduct(int a[][MAXCOLS],int b[][MAXCOLS],int c[][MAXCOLS],int m,int n,int p); void writeoutput(int c[][MAXCOLS],int m,int p); int z=0; void main() { /* char c;*/ int nrows,ncols,mrows,mcols; int a[MAXROWS][MAXCOLS],b[MAXROWS][MAXCOLS],c[MAXROWS][MAXCOLS]; clrscr(); printf(" How many rows in the first matrix? "); scanf("%d",&nrows); printf(" How many cols in the first matrix? "); scanf("%d",&ncols); printf(" How many rows in the second matrix? "); scanf("%d",&mrows); printf(" How many cols in the second matrix? "); scanf("%d",&mcols); if (ncols != mrows) { printf("The product of these matrices is not defined."); getch(); exit(0); } printf(" First table: