1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
main()
{
int a[3][2] = {{-3, +7}, {3, 24}, {45, 7} }
, b[2][4] ={ {-4, 23, 13, 8}, {53, 11, -1, 7} }
, c[3][4], i, j, k, s;
for(i =0;i<3;++i)
for(j=0;j<4;++j)
{
s=0;
for(k=0;k<2;++k)
s+=a[i][k]*b[k][j];
c[i][j] = s;
}
for(i =0;i<3;++i)
{ for(j=0;j<4;++j)
printf("%d, ", c[i][j]);
printf("\n", c[i][j]);
}
while(1);
}
|