New paste Repaste Download
Random r = new Random();
            for (int i = 0; i < a1.Length; i++)
            {
                a1[i] = r.Next(-100, 100);
            }
            int[][] ja = new int[3][];
            ja[0] = new int[] { 1, 2, 3 };
            ja[1] = new int[] { 5, 6 };
            ja[2] = new int[] { 7, 8, 9, 0 };
            Console.WriteLine(ja[0][1]);
            int triangleSize = 5;
            int[][] triArray = new int[triangleSize][];
            for(int i = 0; i <  triArray.Length; i++)
            {
                triArray[i] = new int[i + 1];
                for (int j = 0; j < triArray[i].Length; j++)
                {
                    triArray[i][j] = r.Next(0, 51);
                }
            }
            foreach(int[] row in triArray)
            {
                foreach (int el in row)
                {
                    Console.Write(el + " ");
                }
                Console.WriteLine();
            }
Filename: None. Size: 977b. View raw, , hex, or download this file.

This paste expires on 2024-05-21 15:48:01.040809. Pasted through web.