0

# Distance - c#

Read the four values corresponding to the x and y axes of two points in the plane, p1 (x1, y1) and p2 (x2, y2) and calculate the distance between them, showing four decimal places after the comma, according to the formula: Distance =âˆš (x2-x1)Â² + (y2-y1) Â² https://code.sololearn.com/c93r85WoXKe2/?ref=app

3 Answers

+ 2

Strange, you explain the task with an example of data entry and write code with three inputs instead of two, how is this possible? ðŸ¤”
And your conclusion is that this is not successful nonsense at all.

+ 1

https://code.sololearn.com/c65qqG7cc0KM
Good Luck

0

Input
The input file contains two lines of data. The first one contains two double values: x1 y1 and the second one also contains two double values with one digit after the decimal point: x2 y2.
Output
Calculate and print the distance value using the provided formula, with 4 digits after the decimal point.
Input Sample
1.0 7.0
5.0 9.0
Output Sample
4.4721

Hot today

difference in while loop

2 Votes

Kotlin get if Var doesn't exist

-1 Votes

Somebody help me please ðŸ¥º

0 Votes

Open a web site in C#

0 Votes

What is input?

0 Votes

Decimal to Hex in C++

2 Votes

Why?..?

0 Votes