Write method distance to calculate the distance betweeen two points (x1,y1) and (x2,y2) all numbers and return value s should be of type double
Answers
Answered by
0
Answer:
public double distance (int x1,int x2,int y1,int y2)
{
double s=(double)((x2*x2-x1*x1)-(y2*y2-y1*y1))
}
Step-by-step explanation
Answered by
0
hey mate
I think this is the question of computer applications (perhaps java).
so here we go........
public static double(int x1,int y1,int x2,int y2)
{
double dist=Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));
return dist;
}
Similar questions