Java query to solve
<p>This is the question:</p>

<blockquote>
  <p>Given a circle with the declaration double centerX=0, centerY=0, take
  radius and a point with coordinates x, y. Write a program that
  computes whether or not the point lies inside the circle (including
  the boundary).</p>
  
  <p>Formula:</p>
  
  <p>The distance between two points A (x1,y1) and B(x2,y2) is:</p>
  
  <p>the square root of ((x2-x1)^2+(y2-y1)^2)</p>
  
  <p>Input Specification :</p>
  
  <p>The first line will contain the radius r.</p>
  
  <p>Second line contains x and y. Each value will be the (x,y) coordinate
  such that x, y>0.</p>
  
  <p>Output Specification :</p>
  
  <p>If point lies within the circle print "The point (x, y) is inside the
  circle", else print "The point (x, y) is outside the circle".</p>
  
  <p>Sample input 1:</p>
  
  <p>7</p>
  
  <p>2 5</p>
  
  <p>Sample output 1:</p>
  
  <p>The point (2, 5) is inside the circle</p>
  
  <p>Sample input 2:</p>
  
  <p>2</p>
  
  <p>9 4</p>
  
  <p>Sample output 2:</p>
  
  <p>The point (9, 4) is outside the circle</p>
  
  <p>Explanation:</p>
  
  <p>In Sample input 1, the distance between (0,0) and (2,5) is 5.3851
  which is less than the radius 7. Hence the point is inside the circle.
  Whereas in the other set of input, the point is outside the circle
  because the distance between origin and (9,4) is 9.8488 which is
  greater than the given radius 2.</p>
</blockquote>

<p>Now this is my code:</p>

<pre><code>import java.util.Scanner;
import java.math.*;
class Circ{
    public static void main(String args[]){
        Scanner s=new Scanner(System.in);
        int r=s.nextInt();
        int x=s.nextInt();
        int y=s.nextInt();
        if(x&gt;0&amp;&amp;y&gt;0){
            double dist=Math.sqrt(Math.pow(x-0,2)+Math.pow(y-0,2));
        if(dist&gt;r){
            System.out.println("The point ("+x+","+y+") is outside the circle");
        }else if(dist&lt;=r){
            System.out.println("The point ("+x+","+y+") is inside the circle");
        }
        }

    }
}
</code></pre>

<p>It is giving the right output but not passing the test cases ?</p>

<p><a href="https://i.stack.imgur.com/eO9FN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eO9FN.jpg" alt="enter image description here"></a></p>