Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.omg.CORBA.MARSHAL;
- import org.omg.Messaging.SYNC_WITH_TRANSPORT;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner=new Scanner (System.in);
- boolean hasInside=false;
- Double x=Double.parseDouble(scanner.nextLine());
- Double y=Double.parseDouble(scanner.nextLine());
- int radius=5;
- double dx=Math.abs(x-0);
- double dy= Math.abs(y-0);
- if(dx*dx+dy*dy<=radius*radius)
- {
- hasInside=true;
- }
- System.out.println(hasInside);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment