杭电2001----计算两点间的距离

1 #include<stdio.h>
2 #include<math.h>
3 int main()
4 {
5     double x1,x2,y1,y2;
6     while(~scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2))
7         printf("%.2lf
",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
8     return 0;
9 }
原文地址:https://www.cnblogs.com/qq188380780/p/6038397.html