I have two arrays:
int array1[][] = { { 1, 2, 3 },
{ 4, 5, 6 } };
int array2[][] = { { 1, 2 },
{ 3 },
{ 4, 5, 6 } };
I need to print both of them by column like this:
1 4
2 5
3 6
and
1 3 4
2 5
6
I can do the first one, but I can't seem to use array.length and array[
row ].length to print the array by columns. Thanks.
int array1[][] = { { 1, 2, 3 },
{ 4, 5, 6 } };
int array2[][] = { { 1, 2 },
{ 3 },
{ 4, 5, 6 } };
I need to print both of them by column like this:
1 4
2 5
3 6
and
1 3 4
2 5
6
I can do the first one, but I can't seem to use array.length and array[
row ].length to print the array by columns. Thanks.
Comment