Advertisement
SUni2020

PointInFigure

Mar 27th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class PointInFigure {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. int x = Integer.parseInt(scanner.nextLine());
  7. int y = Integer.parseInt(scanner.nextLine());
  8.  
  9. if ((x>= 2 && x<= 12 && y>= -3 && y<=1)
  10. || (x >= 4 && x<=10 && y>= -5 && y<=3)) {
  11. System.out.println("in");
  12. } else {
  13. System.out.println("out");
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement