public static void Fill(int[] arr, int from, int to, int val)
if (from < 0 || from >= arr.Length)
if (to < 0 || to >= arr.Length)
for (int i = from; i <= to; i++)
public static void PrintArray(int[] arr)
for (int i = 0; i < arr.Length; i++)
Console.Write("{0},",arr[i]);
int[] arr = new int[]{ 5,17,8,29,103,89, 46, 503,22 };
public static void Main()
Console.WriteLine("Hello World");