# 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

- Creating an Excel Formula that adds a certain value when "this" is in a cell.?
- What is WSDL in web services?
- What percentage of computer users are getting the "Bios" "micrcode" updates for their processor to protect against "Spectre?"?
- What is web servicing?
- Where is the program stored while it is being executed (by a interpreter)?
- What do I need to study to build websites?
- What does it mean if a PhD program does not ask for a writing sample in the application? Does this mean that the program is easier to get in?
- What is the difference between cobol and fortran?
- Anyone good with java? struggling on an assignment:(?
- In my new job I have to input numbers in the computer can you show the process?