假设两数组为a[i][j],b[i][j],如:
a: 0 0 1 b: 1 1 0
1 0 0 0 1 1
1 1 1 1 1 1
要得出c: 0 0 0
0 0 0
1 1 1 C++要怎么写?
假设两数组为a[i][j],b[i][j],如:
a: 0 0 1 b: 1 1 0
1 0 0 0 1 1
1 1 1 1 1 1
要得出c: 0 0 0
0 0 0
1 1 1 C++要怎么写?
for(i = 0; i < 3; i ++)
for (j = 0; j < 3; j ++)
c[i][j] = a[i][j] * b[i][j];