Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Ex23_PointOnRectangleBorderv3 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double x1 = sc.nextDouble();
- double y1 = sc.nextDouble();
- double x2 = sc.nextDouble();
- double y2 = sc.nextDouble();
- double x = sc.nextDouble();
- double y = sc.nextDouble();
- if (x == x1 || x == x2 && y >= y1 && y <= y2)
- System.out.println("Border");
- else if (y == y1 || y == y2 && x >= x1 && x <= x2)
- System.out.println("Border");
- else
- System.out.println("Inside/Outside");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement