/*
Enter a point with two coordinates: 4 5
Point (4.0, 5.0) is in the circle.
Enter a point with two coordinates: 9 9
Point (9.0, 9.0) is not in the circle.
*/
import java.util.Scanner;
publicclass PointInACircle {
publicstaticvoidmain(String[] args) {
Scanner input = new Scanner(System.in);
double x1, y1;
x1 = y1 = 0;
System.out.print("Enter a point with two coordinates: ");
double x2 = input.nextDouble();
double y2 = input.nextDouble();
double distance = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
if (distance <= 10)
System.out.println("Point (" + x2 + ", " + y2 + ")" + " is in the circle.");
else
System.out.println("Point (" + x2 + ", " + y2 + ")" + " is not in the circle.");
}
}