I have gone over and over this code. I still get errors when I check it with an online java tester. It is simple. Please help. Thanks.


import java.util.Scanner;

public class coordinate
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);

// Enter a point with two double values
System.out.print("Enter a point with two coordinates: ");
double x = input.nextDouble();
double y = input.nextDouble();

// Compute the horizontal distance to the center of the rectangle
double hDistance = Math.pow(x * x, 0.5);

// Compute the vertical distance to the center of the rectangle
double vDistance = Math.pow(y * y, 0.5);

if (hDistance <= 5 || vDistance <= 2.5)
System.out.println("Point (" + x + ", " + y +
") is in the rectangle");
else
System.out.println("Point (" + x + ", " + y +
") is not in the rectangle");
}
}