Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Complex_Conditions - created by borkins on 2017-03-25.
- */
- import java.util.Scanner;
- public class _03_PointInRectangle
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- double x1 = Double.parseDouble(console.nextLine());
- double y1 = Double.parseDouble(console.nextLine());
- double x2 = Double.parseDouble(console.nextLine());
- double y2 = Double.parseDouble(console.nextLine());
- double pX = Double.parseDouble(console.nextLine());
- double pY = Double.parseDouble(console.nextLine());
- boolean isInside = (pX >= x1 && pX <= x2) && (pY >= y1 && pY <= y2);
- System.out.println(isInside ? "Inside" : "Outside");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment