//DANGER!!!
// this shows algorithm only - use OOP or functions/structs/etc if you want
// have maintainable, re-usable code!!!!!

#include <iostream>
#include <math.h>
using namespace std;

int main(void)
{
	float r1;
	float r2;
	cout << "enter a radius for circle 1" << endl;
	cin >> r1;
	cout << "enter a radius for circle 2" << endl;
	cin >> r2;
	cout << "radius 1 is: "<< r1 << endl;
	cout << "radius 2 is: " << r2 << endl;
	//1. calc distance between 2 points, d
	float c1x=3, c1y=4, c2x=5, c2y=6;  //c1=(3,4);c2=(5,6)
	float d;//distance between two points
	float rt;
	d = sqrt((c1x - c2x)*(c1x - c2x) + (c1y - c2y)*(c1y - c2y));
	//2. sum radii rt=r1+r2
	rt = r1 + r2;
	//3. if (rt> d)
	//cout<<"hit!"<<endl;
	if (rt > d)
		cout << "hit!" << endl;
	else
		cout << "miss!" << endl;
	return 0;
}