/* This program is a driver program to test function Polynomial().

   Output: The value of Polynomial() for polynomials of varying order
--------------------------------------------------------------------*/

#include <iostream.h>

#include "MyMath.h"

int main(void)
{
   cout // P(1.0) for P(x) = 2
        << Polynomial(0, 1.0, 2.0) << endl

        // P(1.0) for P(x) = 2 + 3x
        << Polynomial(1, 1.0, 2.0, 3.0) << endl

        // P(1.0) for P(x) = 2 + 3x + 4x^2
        << Polynomial(2, 1.0, 2.0, 3.0, 4.0) << endl

        // P(1.0) for P(x) = 2 + 3x + 4x^2 + 5x^3
	<< Polynomial(3, 1.0, 2.0, 3.0, 4.0, 5.0)

        << "\n\n";

   return 0;
}

