URI_Problem_1015.java


package URI_Problem;

import static java.lang.Math.sqrt;
import java.util.Scanner;

public class Prob_1015 {
    public static void main(String[] args) {
        double x1, y1, x2, y2, distance;
        Scanner input = new Scanner(System.in);
        x1 = input.nextDouble();
        y1 = input.nextDouble();
        x2 = input.nextDouble();
        y2 = input.nextDouble();
       
        distance = sqrt(Math.pow(x2-x1,2)+(Math.pow(y2-y1,2)));
        System.out.printf("%.4f\n",+distance);
    }
}

Comments

Popular posts from this blog

URI_Problem_1012_Solution.java

URI_Problem_1047.java