static private int Median(int[] array)
int [] tempArray = array;
int count = tempArray.Length;
int middleElement1 = tempArray[(count / 2) - 1];
int middleElement2 = tempArray[(count / 2)];
medianValue = (middleElement1 + middleElement2) / 2;
medianValue = tempArray[(count / 2)];
public static void Main()
int[] ages= {15,17,18,14,16,17,14,14,15,15,14,14,16,16,14,14,14,14,14,14,15,15,15,15,16,16,54};
Console.WriteLine(ages.Length);
Console.WriteLine(ages.Average());
int[] other = new int[ages.Length];
Array.Copy(ages, other,ages.Length);
Console.WriteLine(Median(ages));