#include
#include
int main(){
double x1,y1,x2,y2,dx,dy;
printf("请输入第一个座标:\n");
scanf("%lf %lf",&x1,&y1);
printf("请输入第二个座标:\n");
scanf("%lf %lf",&x2,&y2);
dx=x1-x2;
dy=y1-y2;
dx=sqrt(dx*dx+dy*dy);
printf("%lf\n",dx);
return 0;
}
s = sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
麽分
根号下[(x1-x2)+(y1-y2)]