Advertisement
Guest User

Untitled

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