import java.util.Scanner; public class Distance { public static void main(String[] args) { Scanner input = new Scanner(System.in); double x1, y1, x2, y2, distance; // Read in the coordinates (x1,y1) and (x2,y2) System.out.print("x1 = "); x1 = input.nextDouble(); System.out.print("y1 = "); y1 = input.nextDouble(); System.out.print("x2 = "); x2 = input.nextDouble(); System.out.print("y2 = "); y2 = input.nextDouble(); distance = Math.sqrt( Math.pow( (x1-x2), 2) + Math.pow( (y1-y2), 2) ); } }