Professional Documents
Culture Documents
struct Point
{
int val; // Group of point
double x, y; // Co-ordinate of point
double distance; // Distance from test point
};
// Driver code
int main()
{
int n = 5; // Number of data points
Point arr[n];
arr[0].x = 100;
arr[0].y = 25;
arr[0].val = 0;
arr[1].x = 20;
arr[1].y = 90;
arr[1].val = 1;
arr[2].x = 95;
arr[2].y = 15;
arr[2].val = 0;
arr[3].x = 25;
arr[3].y = 110;
arr[3].val = 1;
/*Testing Point*/
Point p;
cout<<"enter the x coordinate for test point::";
cin>>p.x;
cout<<"enter the x coordinate for test point::";
cin>>p.y;