Determine which point is closest to the set point


Find closest pair and most-distant pair from a given point.
Generate two random integer numbers between 1 and 200. These are the coordinates of a point (x-value and y-value).
Then generate 20 other points with the same range for x and y (1-200).
Determine which point is closest to the set point (the first point generated) and which point is the furthest from the set point.
The distance formula is: d2 = (x2 - x1)2 + (y2 - y1)2 , where x1 and y1 are the coordinates of one point, and x2 and y2 are the
coordinates of a second point. (distance is a real-number, not an integer)
Write and call a function to calculate the distance.  

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Determine which point is closest to the set point
Reference No:- TGS088002

Expected delivery within 24 Hours