/* This program processes a list of monthly profits.

   Input:  A sequence of monthly profits
   Output: The minimum, maximum, and average of the profits
-----------------------------------------------------------------*/

#include <iostream.h>
#include <iomanip.h>

#include "MyStats.h"

int main(void)
{
   cout << "\nThis program processes a list of monthly profits.\n";

   double
      MinProfit,
      MaxProfit,
      AverageProfit;

   FindMinMaxAverage(MinProfit, MaxProfit, AverageProfit);

   cout << setprecision(2) << setiosflags(ios::fixed | ios::showpoint)
	<< "\n\nThe worst month was:    " << setw(8) << MinProfit
        << ",\nthe best month was:     " << setw(8) <<  MaxProfit
        << ", and\nthe average profit was: " << setw(8) << AverageProfit
        << "\n\n";

   return 0;
}

