Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace three_dimensional_array
- {
- class Program
- {
- static void Main(string[] args)
- {
- char[, ,] chCube =
- {
- //first layer
- {
- {'a', 'b', 'c'}, //row 0 values
- {'d', 'e', 'f'}, //row 1 values
- {'g', 'h', 'i'} //row 2 values
- },
- //second layer
- {
- {'j', 'k', 'l'}, //row 0 values
- {'m', 'n', 'o'}, //row 1 values
- {'p', 'q', 'r'} //row 2 values
- },
- //third layer
- {
- {'s', 't', 'u'}, //row 0 values
- {'v', 'w', 'x'}, //row 1 values
- {'y', 'z', '0'} //row 2 values
- }
- }; //The cube size is 3 x 3 x 3 (3 layers, 3 rows, 3 columns)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment