#include<stdio.h>
#include<math.h>
int main(){
double a,b,c,d,x,y,p,q,m;
while(scanf("%lf%lf%lf%lf",&a,&b,&c,&d)!=EOF){
p=a-c;
q=b-d;
x=fabs(p);
y=fabs(q); //double=fabs(double);
m=x*x+y*y;
printf("%.2lf\n",sqrt(m)); //sqrt()中被開方數(shù)不能是int型
}
return 0;
}
//這題呢要注意用double,float在杭電上 有時(shí)是不行的
【轉(zhuǎn)】網(wǎng)上關(guān)于sqrt函數(shù)用法的參考http://blog.csdn.net/abaloon/article/details/8123902