Problem : 2001 ( 计算两点间的距离 ) Judge Status : AcceptedRunId : 5995399 Language : C Author : qq1203456195Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
1 #include <stdio.h>
2 #include <math.h>
3 int main()
4 {
5 double x1,y1,x2,y2;
6 while (scanf(
"%lf%lf%lf%lf",&x1,&y1,&x2,&y2)!=
EOF)
7 printf(
"%.2lf\n",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-
y1)));
8 return 0;
9 }
转载于:https://www.cnblogs.com/CheeseZH/archive/2012/05/25/2518646.html
相关资源:数据结构—成绩单生成器