1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
double a[3][3][3] = { { { 1,2,3 }, { 4,5,6}, { 7,8,9 } },
{ { 10,11, 12 }, { 13, 14, 15 }, { 1, 5, 8 } },
{ { 16, 17, 18 }, { 19, 20, 21 }, { 22, 23, 24 } }
};
for( int i = 0; i!= 3; ++i ){
for( int x = 0; x!= 3; ++x ){
for( int y = 0; y!= 3; ++y ){
std::cout << a[i][x][y] << " ";
}
std::endl( std::cout );
}
std::endl( std::cout );
}
// OR
std::array<std::array<std::array<double, 3>, 3>, 3> multi;
|