public static void Main()
Console.WriteLine("Enter the number of highest elements you want to extract from the array:");
while (!int.TryParse(Console.ReadLine(), out n))
Console.WriteLine("Enter the number of highest elements you want to extract from the array:");
double[] arr = { 12.1, 5.9, 2.9, 6.8, 20.5 };
double[] result = new double[n];
for (int j = 0; j < n; j++)
for (i = 1; i < arr.Length; i++)
arr[k] = Double.MinValue;
Console.WriteLine("Highest numbers: {0}", result[j]);