Swift Program to Create a Three-Dimensional Array

You are currently viewing Swift Program to Create a Three-Dimensional Array

Swift program to create a three-dimensional array

// Swift program to create a three-dimensional array

import Swift

let ThreeDArray: [[[Int]]] = [[[1, 3], [5, 7]],
                              [[2, 4], [6, 8]]]

print("3D Array: ",ThreeDArray)

Output

3D Array:  [[[1, 3], [5, 7]], [[2, 4], [6, 8]]]

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply