using System.Threading.Tasks;
public static void Main()
Console.WriteLine("Enter the max number of sub-arrays");
int maxSubarrayCount = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the max size of each sub-array");
int maxSubarraySize = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the max value of array elements");
int maxValue = int.Parse(Console.ReadLine());
int subarrayCount = Random.Shared.Next(1, maxSubarrayCount + 1);
int[][] arrayOfIntegerArrays = new int[subarrayCount][];
for (int i = 0; i < arrayOfIntegerArrays.Length; i++)
var subarraySize = Random.Shared.Next(1, maxSubarrayCount + 1);
arrayOfIntegerArrays[i] = new int[subarraySize];
for (int subIndex = 0; subIndex < arrayOfIntegerArrays[i].Length; subIndex++)
arrayOfIntegerArrays[i][subIndex] = Random.Shared.Next(1, maxValue + 1);
foreach (int[] subarray in arrayOfIntegerArrays)
foreach (int value in subarray)
Console.Write($"{value} ");