-->
当前位置:首页 > 题库

PROGRAMMING:Calculates the distance between two points in a coordinate system

Luz5年前 (2021-05-10)题库452
Define a structure type to represent the coordinates (x, y) of a point on the plane, and input the coordinates of two points Z1 and Z2 from the keyboard. The coordinate value is integer data, and output the distance between the two points.
###Input format:
Enter the coordinates of two points Z1 and Z2 from the keyboard, separated by spaces
###Output format:
Output data to two decimal places.
###Input example:
```in
3 4 5 6
```
###Output example:
```out
distance = 2.83
```
###Input example:
```in
0 0 100 100
```
###Output example:
```out
distance = 141.42
```







answer:If there is no answer, please comment