杭电oj 2001 java

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/tobe_numberone/article/details/88622633
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner read = new Scanner(System.in);
        while(read.hasNextDouble()) {
            double x1 = read.nextDouble();
            double y1 = read.nextDouble();
            double x2 = read.nextDouble();
            double y2 = read.nextDouble();
            System.out.printf("%.2f", Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2, 2)));
            System.out.println();
        }
        read.close();
    }

}

猜你喜欢

转载自blog.csdn.net/tobe_numberone/article/details/88622633
0条评论
添加一条新回复
  
今日推荐