Update DS/C/Lab/Week4/fasttranspose.c
This commit is contained in:
parent
dbfafdcd1a
commit
f44fd64fd0
@ -31,10 +31,19 @@ int main() {
|
||||
struct Element b[MAX_TERMS];
|
||||
int m = 4, n = 3, num = 4;
|
||||
|
||||
printf("The Original Matrix is:\n\n");
|
||||
printf("row col val\n");
|
||||
for (int i = 0; i < num; i++)
|
||||
printf("%d\t%d\t%d\n", a[i].row, a[i].col, a[i].value);
|
||||
|
||||
printf("\n\n");
|
||||
fastTranspose(a, b, m, n, num);
|
||||
|
||||
printf("The Transpose Matrix is:\n\n");
|
||||
printf("row col val\n");
|
||||
for (int i = 0; i < num; i++)
|
||||
printf("%d %d %d\n", b[i].row, b[i].col, b[i].value);
|
||||
printf("%d\t%d\t%d\n", b[i].row, b[i].col, b[i].value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user