public static int [] BuildArray(int Len,int n1, int n2)
int [] arr= new int [Len];
Random rnd = new Random();
for (int i = 0; i<arr.Length; i++)
arr[i]=rnd.Next(n1+n2+1);
public static void Printarray(int [] arr)
for (int i = 0; i<arr.Length; i++)
Console.WriteLine(arr[i]);
public static void Main()
int [] a = BuildArray(10,10,99);
int [] b = BuildArray(100,100,999);
Printarray(BuildArray(5,21,50));