alvsjo

02-09 tacka i kruznica

Oct 27th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class zad02_09 {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner input = new Scanner (System.in);       
  7.     double x,y;
  8.     x=input.nextDouble();
  9.     y=input.nextDouble();  
  10.  
  11.    
  12.     if (x<=6 && x>=4 && y<=x-4 && y*y<=6*6-x*x)
  13.         System.out.println("Pripada");
  14.     else if (x<=4 && x>=0 && y*y<=4*4-x*x)
  15.         System.out.println("Pripada");
  16.     else if (x<=4 && x>=0 && y<=x-4 && y*y<=4*4-x*x)
  17.         System.out.println("Pripada");
  18.     else if(x<=0 && x>=-6 && y*y>=4*4-x*x && y*y<=6*6-x*x)
  19.         System.out.println("Pripada");
  20.     else
  21.         System.out.println("Ne pripada");
  22.    
  23.        
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment