#include
int main(void)
{
int ar1[2][2] = { {2,0},{1,0} };
int ar2[2][2] = { {1,2} ,{0,0} };
int ar3[2][2];
int i;
int j;
int c=2;
int k;
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < c; k++)
ar3[i][j] += ar1[i][k] * ar2[k][j];
for (i = 0; i < 2; i++)
{
for (j = 0; j < 2; j++)
{
printf("%d\t", ar3[i][j]);
}
printf("\n");
}
return 0;
}
沒有初始化數組