# Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsDistance.?

The calculation is:

Distance = SquareRootOf( (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.

Distance = SquareRootOf( (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.

Good luck with your homework! Thanks for posting it. When you have the solution, please share it if you wish.

#include<cmath> //C++

or

#include<math.h> //C

define these variables x_1, y_1,x_2,y_2;

//Implement the input for C or C++

distance = sqrt(pow(x_2-x_1,2)+pow(y_2-y_1,2));

//show the distance

### Trending

- Is it possible to express signals or codes in the form of equations?
- Please answer using Java eclipse ?? Help?
- How do I enter image url into database table, what is the correct data type for inputting image url? I am using visual studio?
- What is the process for building a 3d model for print?
- What techniques should I learn to make the most money?
- What is a format of storing data (text and images) that is not likely to go extinct in the next 15 years?
- Has anyone created a free website? If so how?
- If i was to learn about computers, what exactly is what i should learn?
- Write a python code to calculate 6! By using for or while loop?
- Why won't my picture show on HTML?