Maths Explanation Assignment | Homework Help Websites
February 3rd, 2019
#include <stdio.h>
int a[3][4] ={
{1,2,3,4},
{5,6,7,8},
{9,10,11,12}};
int b[4][3] ={
{4,8,12},
{3,7,11},
{2,6,10},
{1,5,9}};
int c[3][3];
int i,k,j,m,n,sum;
int main(){
for(i= 0; i < 3; ++i){
for(k = 0; k < 3; ++k){
sum = 0;
for (j = 0; j < 4; ++j){
sum = sum + (a[i][j] * b[j][k]);
c[i][k] = sum;
}
}
for(m = 0; m < 3; ++m){
for (n = 0; n < 3; ++n){
printf(“%d “,c[m][n]);
}
printf(“\n”);
}
return 0;
}