Online Judge【杭电】[2001]计算两点间的距离问题描述计算两点间的距离[hdu-2001] [3151975822656813] @vjudge问题分析还是用这种吧… 1 2 3 4 5 6 7 8 9 10 11 #include<stdio.h> #include<math.h> int main() { double d,x1,y1,x2,y2; while(scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2)!=EOF) { printf("%.2lf\n",d=sqrt(pow(x1-x2,2)+pow(y1-y2,2))); } return 0; }