62.4k views
4 votes
Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to point distance. the calculation is: distance = square root of( (x2 - x1)2 + (y2 - y1)2 ) you may declare additional variables. ex: for points (1.0, 2.0) and (1.0, 5.0), pointsdistance is 3.0.

User Stochastic
by
7.4k points

1 Answer

3 votes

we are given two points as

(1.0, 2.0) and (1.0, 5.0)

so,

(x1, y1)= (1.0 , 2.0)

(x2, y2)= (1.0 , 5.0)

x1=1 , y1=2

x2=1 , y2=5

now, we can use distance formula


d=√((x_2-x_1)^2+(y_2-y_1)^2)

now, we can plug values

and we get


d=√((1-1)^2+(5-2)^2)


d=√((0)^2+(3)^2)


d=√((3)^2)


d=3

so, distance between points is 3...........Answer

User David Narayan
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories