(Distance Between Points) Write function distance that calculates the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double.
(Distance Between Points) Write function distance that calculates the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double.
The input consists of n (0<n<100) samples.
Each sample consists of two lines.
Each line of the same sample consists of doubles x, y (range from 0 to 100).
The last line of input consists of Int(-1).
The decimal precision of output is 1.
输入
1 1 1 0 1 1 0 0 0 1 0 0 -1
输出
1.0 1.4 1.0