Advertisement
n_stefanov

Ex3_PointsInsideAFigure

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