Generation

generate functionThu, 17 Nov 2022

Function to Calculate median value for an array

public static double Med(double[] x) { // Сортируем массив Array.Sort(x); // Получаем средний элемент return x[(x.Length - 1) / 2]; }

Questions about programming?Chat with your personal AI assistant