**********************************************************************************
Write a float function that will have four float parameters. The four parameters represent two Cartesian points, 2 x's and 2 y's. Return the distance between the two points. It involves a square root.
Write a main function which will ask the user for 2 points (4 numbers), decide whether the distance between them is within 25 units ("hit"), exactly 25 units ("on the rim"), or more than 25 units away ("missed"). You must call the function written previously. Use the fewest possible number of if statements and comparisons to do this efficiently. Output this message on the console window (use "cout").
Then add in some code to use the first point entered as the center of a circle, and draw a circle that is 25 units in radius. Draw a small circle at the location of the other point. Output the classification of the distance on the graphics screen (look up the function "outtextxy".). The use of the word "units" does not imply any conversions needed, they are just 'spaces on the plane' or pixels in the graphics sense
*********************************************************************************
this is what i have so far
#include <iostream>
#include <cmath>
using namespace std;
float points (x1, x2, y1, y2)
int main ()
{
float x1 = 0;
float x2 = 0;
float y1 = 0;
float y2 = 0;
float distance;
cout << "Please enter the cordinates for the first point.";
cin >> (x1) >> (y1);
cout << "Now enter the cordinates for the second point.";
cin >> (x2) >> (y2);
distance = sqrt(x2-x1) + (y2-y1);
}
float points (x1, x2, y1, y2)
{
if (distance < 25)
return "hit";
else if (distance == 25)
return "on the rim";
else if (distance > 25)
return "miss";
}