2d Arrays & Nested Loops
Lesson 25Author : 🦒
Last Updated : November, 2017
Code
// int numberGrid[2][3];
int numberGrid[2][3] = { {1, 2, 3}, {4, 5, 6} };
numberGrid[0][1] = 99;
cout << numberGrid[0][0] << endl;
cout << numberGrid[0][1] << endl;
for(int i = 0; i < 2; i++){
for(int j = 0; j < 3; j++){
printf("%d", numberGrid[i][j]);
}
}