// findMax.cc P.Conrad CISC106 sect 99 
// find the maximum value in an array of double

// @@@ here is where I would put examples, etc. if I were doing
// the whole design recipe thing

double findMax(double a[], int length)
{

  double max = a[0];

  for (int k=1; k<length; k++)
    {
      if (a[k] > max)
	max = a[k];
    }

  return max  ;

}

