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

PROGRAMMING:Finding the distance between two points in polar coordinates

Luz5年前 (2021-05-10)题库545
Given the polar coordinates of two points on the plane, and the unit of polar angle is degree, write a program to calculate the distance between the two points. All real numbers are required to use double type. If necessary, the approximate value of PI is 3.141592653589793.
###Input format:
In the first line, enter the values of the polar diameter and polar angle of the first point, separated by spaces; In the second line, enter the values of the polar diameter and polar angle of the second point, separated by spaces.
###Output format:
Output the value of the distance, retain two decimal places, and finally wrap.
###Input example:
```in
3.3 12.3
4.1 100.36
```
###Output example:
```out
distance=5.18
```







answer:If there is no answer, please comment