Question: Answer IN C: Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsDistance. The calculation is: Ex: For

Answer IN C:

Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsDistance. The calculation is: Answer IN C: Determine the distance between point (x1, y1) and point Ex: For points (1.0, 2.0) and (1.0, 5.0), pointsDistance is 3.0.

#include #include

int main(void) { double x1; double y1; double x2; double y2; double xDist; double yDist; double pointsDistance;

xDist = 0.0; yDist = 0.0; pointsDistance = 0.0;

scanf("%lf", &x1); scanf("%lf", &y1); scanf("%lf", &x2); scanf("%lf", &y2);

/* Your solution goes here */

printf("%lf ", pointsDistance);

return 0; }

Distance =(x2x1)2+(y2y1)2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!