Commit c788bf67 authored by elijah vasquez's avatar elijah vasquez 🦍

Upload New File

parent a7f15e16
public class Pointmain {
public static void main(String[] args) {
Point x1 = new Point();
x1.x = 20;
Point x2 = new Point();
x2.x = 10;
Point y1 = new Point();
y1.y = 10;
Point y2 = new Point();
y2.y = 5;
double xresult = Math.pow((x1.x - x2.x), 2);
double yresult = Math.pow((y1.y - y2.y), 2);
double finalsum = Math.sqrt(xresult + yresult);
System.out.println("d = " + finalsum);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment