using System;
class Program
{
static void Main() {
int[,,] array3d = new int[,,] { { { 1, 2, 3, 4 }, { 5, 6, 7, 8 } },
{ { 10, 20, 30, 40 }, { 50, 60, 70, 80 } },
{ { 9, 10, 11, 12 }, { 13, 14, 15, 16 } } };
for (int i = 0; i < array3d.GetLength(0); i++) {
for (int j = 0; j < array3d.GetLength(1); j++) {
for (int k = 0; k < array3d.GetLength(2); k++) {
Console.Write("{0} ", array3d[i, j, k]);
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
/*
run:
1 2 3 4
5 6 7 8
10 20 30 40
50 60 70 80
9 10 11 12
13 14 15 16
*/