j0 j1 j2 j3 j4 j5
ââââââ¬âââââ¬âââââ¬âââââ¬âââââ¬âââââ
i0 | 1 | 2 | 3 | 4 | 5 | 6 |
ââââââ¼âââââ¼âââââ¼âââââ¼âââââ¼âââââ¤
i1 | 6 | 5 | 4 | 3 | 2 | 1 |
ââââââ´âââââ´âââââ´âââââ´âââââ´âââââ
int x[2][6] = {
{1,2,3,4,5,6}, {6,5,4,3,2,1}
};
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < 6; ++j) {
std::cout << x[i][j] << " ";
}
}
// Outputs: 1 2 3 4 5 6 6 5 4 3 2 1