// quadSolver1.cc P. Conrad CISC181 04/06/06
// driver program for quadratic eqn solver

#include <iostream>
using namespace std;

#include <cstdlib> // for exit and atof

#include "quadFunctions.h"

int main(int argc, char *argv[])
{

  if (argc != 4)
    {
      cerr << "usage: " << argv[0] << " a b c " << endl;
      cerr << "   a, b, c should be coeffs of a quadratic eqn " << endl;
      exit(1);

    }

  double a, b, c;

  a = atof(argv[1]);
  b = atof(argv[2]);
  c = atof(argv[3]);

  double root1 = quadSolve1(a, b, c);
  double root2 = quadSolve2(a, b, c);


  cout << "roots are " << root1 << " and " << root2 << endl;
  // yes if the roots are the same, we'll print the same root twice
  // we won't worry about that for now.

  return 0;
}
