Advertisement
Guest User

PointsInsideAFigure

a guest
May 11th, 2014
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. package javaSyntaxix;
  2. import java.util.Scanner;
  3.  
  4. public class PointsInsideAFigure {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner sc = new Scanner(System.in);
  8.         String input = sc.nextLine();
  9.         String arr[] = input.split(" ");
  10.         double x = Double.parseDouble(arr[0]);
  11.         double y = Double.parseDouble(arr[1]);
  12.         if(y<6 || y> 13.5) System.out.println("Outside");
  13.         else
  14.         {
  15.             if(x<12.5 || x>22.5) System.out.println("Outside");
  16.             else
  17.             {
  18.                 if(x>17.5&&x<20&&y>8.5) System.out.println("Outside");
  19.                 else System.out.println("Inside");
  20.             }
  21.         }
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement