+ 5
How to display values on at 2d array?
a 5×5 grid (2d array) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 18 19 20 21 22 23 24 25
4 Respuestas
+ 2
int a[5][5]; //add data to array...
//print it:
for (int i=0; i<5; i++){
for(int j=0; j<5; j++)
sys.out.print(a[i][j]+" ");
sys.out.println;
}
+ 2
sorry I forgot to mention in javascript
+ 2
when I try this is with something like array[row][column] it displays 0 or 1
0
not familiar with js but it should be more/less same, outter loop is for every row, inner is for columns in that row... I guess :P