// lab02b.cc Sample program to calculate circle overlap
// P. Conrad 9/13/2004 (note: substitute your own name and date in your
//                      circle overlap program)

// the following two lines allow stream input and output
#include <iostream>
using std::cout;
using std::cin;
using std::flush;
using std::endl;

// the following line allows use of math library, including sqrt
#include <cmath>

// ************ user defined functions ***********

int circleOverlap(double x1,
		  double y1,
		  double r1,
		  double x2,
		  double y2,
		  double r2)
{
  double sampleSquareRoot;

  sampleSquareRoot = sqrt(r1 + r2);
  
  // temporarily, always return 0, indicating the
  // circles don't overlap.  Remove the next line of code
  // and this comment when you are finished coding your algorithm

  return 0;  // temporary return statement

}

// ************ main program  ************

int main(void)
{
  // declare variables for user supplied numbers

  double x1,y1,r1,x2,y2,r2;

  // prompt for and read input

  cout << "Please enter x1 y1 r1, separated by spaces:";
  cin >> x1 >> y1 >> r1;

  cout << "Please enter x2 y2 r2, separated by spaces " << flush;
  cin >> x2 >> y2 >> r2;


  // output result, and end program

  if (circleOverlap(x1,y1,r1,x2,y2,r2)==1)
    {
      cout << "The circles overlap" << endl;
    }
  else
    {
      cout << "The circles do not overlap" << endl;
    }
  
  return 0; // ends the main program
  
}

// Note: there are several possible simplifications to the code above;
// We can discuss some of these in lecture if you ask about them.

