|
|
0 1 2 3 4 5 6 7 8 9 0 8 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2 1 0 |
The problem isn't with the array definition, it is will your for loop. You need three for loops. One to loop through the index and print that on one line, one to loop through the 0 index and then another to loop through the 1 index. Or you could do one loop through the index value, then one outer loop through the 0 & 1 outer index, followed by an inner loop for the 10 inner elements. |
|
|