#include
Int * * Get2DArray (int row, int col) {
* * a, int l;
A=(int * *) calloc (row, sizeof (int *));
For (l=0; L
return a;
}
Int yasuo (int * o, int * * a, int n) {
int i,j;
for(i=0; i
A [I] [j]=o [I * (I + 1)/2 + j];
The else
A [I] [j]=o [j * (j + 1)/2 +] I;
}
}
Int * * multiple (int * o, int * p, * * c int, int n) {
Int I, j, k, l, d, s;
C=Get2DArray (n, n);
for(i=0; i
for(j=0; j
For (k=0; k
If (i>=k)
L=(I + 1) * I/2 + k;
If (i
If (j>=k)
D=(j + 1) * 2 + j/k;
If (j
S + p=o [l] * [d].
}
C [I] [j]=s;
S=0;
}
}
return c;
}
/* run this program using the console pauser or add your own getch, system (" pause ") or the input loop */
Int main (int arg c, char * argv []) {
Int * o * p, * * a, b, * * * * c, n, I, k, j, l;
Printf (" please enter the order number n: \ n ");
The scanf (" % d ", & amp; N);
A=Get2DArray (n, n);
B=Get2DArray (n, n);
C=Get2DArray (n, n);
K=(1 + n) * n/2;
O=(int *) malloc (sizeof (int) * k);
P=(int *) malloc (sizeof (int) * k);
Printf (" generating matrix A, please input % d compression matrix of Numbers: \ n ", k);
For (l=0; i
Yasuo (o, a, n);
Printf (" matrix A is: \ n ");
for(i=0; i
If (j)==n - 1
printf("\n");
}
Printf (" generator matrix B please input % d compression matrix of Numbers: \ n ", k);
For (l=0; i
Yasuo (p, b, n);
Printf (" matrix B is: \ n ");
for(i=0; i
If (j)==n - 1
printf("\n");
}
C=multiple (o, p, c, n);
Printf (" matrix for C: \ n ");
for(i=0; i
If (j)==n - 1
printf("\n"); }
return 0;
}
Run to draw

Want to effect

