java 2.15
import java.util.Scanner;
public class Leng
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("请输入第一个点的坐标:");
double x1=input.nextDouble();
double y1=input.nextDouble();
System.out.print("请输入第二个点的坐标:");
double x2=input.nextDouble(); double y2=input.nextDouble();
double leng=Math.pow(((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)),0.5);
System.out.println("这两个点之间的距离为:"+leng);
}
}