public static double average(double[] values) {double ave = 0;double sum = 0;for (double value : values) {sum += value;}ave = sum / values.length;return ave;}
public static double Average(double[] values){double ave = 0;double sum = 0;for (int i = 0, iSize = values.Length; i < iSize; i++){sum += values[i];}ave = sum / values.Length;return ave;}