Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaSyntaxix;
- import java.util.Scanner;
- public class PointsInsideAFigure {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String input = sc.nextLine();
- String arr[] = input.split(" ");
- double x = Double.parseDouble(arr[0]);
- double y = Double.parseDouble(arr[1]);
- if(y<6 || y> 13.5) System.out.println("Outside");
- else
- {
- if(x<12.5 || x>22.5) System.out.println("Outside");
- else
- {
- if(x>17.5&&x<20&&y>8.5) System.out.println("Outside");
- else System.out.println("Inside");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement