Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Locale;
- import java.util.Scanner;
- public class PointsInsideAFigure {
- public static void main(String[] args) {
- Locale.setDefault(new Locale("en", "US"));
- Scanner input = new Scanner(System.in);
- double pointX = input.nextDouble();
- double pointY = input.nextDouble();
- if (pointX >= 12.5 && pointX <= 22.5 && pointY >= 6 && pointY <= 13.5) {
- if (pointX > 17.5 && pointX < 20.0 && pointY > 8.5 && pointY < 13.5) {
- System.out.println("Outside");
- }
- else{
- System.out.println("Inside");
- }
- }
- else{
- System.out.println("Outside");
- }
- input.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement