Program threed.cs

Demonstrates a three-dimensional array 



using System;

class Program {

    static void Main() {

        int[, ,] threeD = new int[2, 3, 4]{
            
            {{0,1,2,3},{4,5,6,7},{8,9,10,11}},
            {{12,13,14,15},{16,17,18,19},{20,21,22,23}}

        };

        for (int i = 0; i < 2; i++) {

            for (int j = 0; j < 3; j++) {

                for (int k = 0; k < 4; k++) {

                    Console.WriteLine(threeD[i,j,k]);

                }

            }

        }

        Console.WriteLine("Press the Enter key to exit program... ");
        Console.ReadLine();
    }

}