31
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
int[,,] arr3d1 = new int[1, 2, 2]{
8
{{1, 2}, {3, 4}} // 1 row of two-dimensional array
9
};
10
11
int[,,] arr3d2 = new int[2, 2, 2]{ // 2 rows of two-dimensional array
12
{{1, 2}, {3, 4}},
13
{{5, 6}, {7, 8}}
14
};
15
16
int[,,] arr3d3 = new int[2, 2, 3]{ // 2 rows of two-dimensional array
17
{{1, 2, 3}, {4, 5, 6}},
18
{{7, 8, 9}, {10, 11, 12}}
19
};
20
21
Console.WriteLine("arr3d2 Values");
22
Console.WriteLine(arr3d2[0, 0, 0]);
23
Console.WriteLine(arr3d2[0, 0, 1]);
24
Console.WriteLine(arr3d2[0, 1, 0]);
25
Console.WriteLine(arr3d2[0, 1, 1]);
26
Console.WriteLine(arr3d2[1, 0, 0]);
27
Console.WriteLine(arr3d2[1, 0, 1]);
28
Console.WriteLine(arr3d2[1, 1, 0]);
29
Console.WriteLine(arr3d2[1, 1, 1]);
30
}
31
}
Cached Result
Найбільший елемент масиву: 5