张叶

import java.util.Scanner;
  public class Jisuanjl{
  public static void main(String[] args){
    Scanner input=new Scanner(System.in);
    System.out.print("Enter x1 and y1:");
    double x1=input.nextDouble();
    double y1=input.nextDouble();
    Scanner input1=new Scanner(System.in);
    System.out.print("Enter x2 and y2:");
    double x2=input1.nextDouble();
    double y2=input1.nextDouble();
    double l=Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));
    System.out.println("The distance between the two point is "+l);

  }
}

posted @ 2017-09-18 11:48  啦啦啦也好吃  阅读(106)  评论(0编辑  收藏  举报