Home »
Code Examples »
Scala Code Examples
Scala - A Three Dimensional Array Code Example
The code for A Three Dimensional Array
val x, y, z = 3
val a = Array.ofDim[Int](x,y,z)
for {
i <- 0 until x
j <- 0 until y
k <- 0 until z
} println(s"($i)($j)($k) = ${a(i)(j)(k)}")
Code by IncludeHelp,
on August 10, 2022 23:38