lab_branch #1
@ -31,10 +31,19 @@ int main() {
|
|||||||
struct Element b[MAX_TERMS];
|
struct Element b[MAX_TERMS];
|
||||||
int m = 4, n = 3, num = 4;
|
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);
|
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++)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user