import java.util.Scanner;
public class TestObject {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
System.out.println("请输入第一个坐标点:");
int x1 = in.nextInt();
int y1 = in.nextInt();
System.out.println("请输入第二个坐标点:");
int x2 = in.nextInt();
int y2 = in.nextInt();
int distance = (int) Math.sqrt(Math.abs((x1 - x2)*(x1 - x2))+Math.abs((y1 - y2)*(y1 - y2)));
System.out.println("两点间距离是:"+distance);
}
}
#include
#include
int main()
{
double x1,x2,y1,y2,d;
while(scanf("%lf %lf %lf",&x1,&x2,&y1,&y2)!=EOF)
{
d=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1);
d=pow(d,0.5);
}
return 0;
}