static private float Mdian(int[] array)
int [] tempArray = array;
int count = tempArray.Length;
int THING1 = tempArray[(count / 2) - 1];
int THING2 = tempArray[(count / 2)];
medianValue = (THING1 + THING2) / 2;
medianValue = tempArray[(count / 2)];
public static void Main()
int[] olist = new int[10];
Console.WriteLine("Your original list is:");
for(int i = 0; i < 10; i++)
olist[i] = r.Next(1, 101);
Console.Write(olist[i] + " ");
Console.Write("Your numbers in order from smallest to largest are: ");
foreach(int number in olist)
Console.Write(number + " ");}
Console.WriteLine("The average is: " + olist.Average());
Console.WriteLine("The median is: " + Mdian(olist));
Console.WriteLine("Would you like to get a new list to run the program again? y/n ");
string choice1 = Console.ReadLine();
if (choice1 == "Y" || choice1 == "y")