#include<iostream.h>
#include<iomanip.h>
void main()
{
int a[3][4]={{1,5,8,-7},{4,8,7,2},{8,9,56,6}};
int b[4][5]={{4,7,5,7,8},{7,7,8,9,9},{7,5,9,8,5},{5,2,2,3,6}};
int i,j,k;
int c[3][5]={{0}};
for(i=0;i<3;i++)
for(j=0;j<5;j++)
for(k=0;k<4;k++)
c[i][j]+=a[i][k]*b[k][j];
for(i=0;i<3;i++)
cout<<endl;
for(j=0;i<5;j++)
cout<<setw(5)<<c[i][j]<<endl;
}这是源代码