Average this time
ar.Sort();
double ar_sum = 0;
for (int h = 0; h < ar.Count; h++)
{
ar_sum += double.Parse(ar[h].ToString());
}
double ar_average = 0;
ar_average = Math.Round(ar_sum / ar.Count);
MessageBox.Show(ar_average.ToString());
ar.Sort();
double ar_sum = 0;
for (int h = 0; h < ar.Count; h++)
{
ar_sum += double.Parse(ar[h].ToString());
}
double ar_average = 0;
ar_average = Math.Round(ar_sum / ar.Count);
MessageBox.Show(ar_average.ToString());
Comments