Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class zad02_09 {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- double x,y;
- x=input.nextDouble();
- y=input.nextDouble();
- if (x<=6 && x>=4 && y<=x-4 && y*y<=6*6-x*x)
- System.out.println("Pripada");
- else if (x<=4 && x>=0 && y*y<=4*4-x*x)
- System.out.println("Pripada");
- else if (x<=4 && x>=0 && y<=x-4 && y*y<=4*4-x*x)
- System.out.println("Pripada");
- else if(x<=0 && x>=-6 && y*y>=4*4-x*x && y*y<=6*6-x*x)
- System.out.println("Pripada");
- else
- System.out.println("Ne pripada");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment