Here is the code that is giving me problems. im trying to write code that will find the distence between two points. but i get the cannot find symbol error on lines 27-29(when i start doing math).
import java.lang.*; import java.util.Scanner; public class Program { public static void main (String[] args) { double x1, y1, x2, y2; // coordinates of two points double distance; // distance between the points Scanner scan = new Scanner(System.in); // Read in the two points System.out.print ("Enter the coordinates of the first point " + "(put a space between them): "); x1 = scan.nextDouble(); y1 = scan.nextDouble(); System.out.print ("Enter the coordinates of the second point: "); x2 = scan.nextDouble(); y2 = scan.nextDouble(); // Compute the distance double a, b, c, d, e, f; a = x2 + x1; b = y2 + y1; e = Math.java.pow(a,2); f = Math.java.pow(b,2); distance = Math.java.sqrt((e + f)); // Print out the answer System.out.println(distance); } }