#include <stdio.h>
#include <math.h>
void main()
{
float x1,y1,x2,y2;
double distance;
//float 变量有效数字为6位,double是10位,为了防止求完距离后精确度不够,distance采用double型
printf("Enter the first point's X and Y");
scanf("%f",&x1);
scanf("%f",&y1);
printf("Enter the second point's X and Y");
scanf("%f",&x2);
scanf("%f",&y2);
distance=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
printf("The distance between (x1,y1) and (x2,y2) is %lf",distance);
}