Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.println("Введите координату x");
- double x = 0;
- x = scanner.nextInt();
- System.out.println("Введите координату y");
- double y = 0;
- y = scanner.nextInt();
- if ((x + y <= 1) && (2 * x - y <= 1) && (y>=0)) {
- System.out.println("Точка M принадлежит множеству D");
- }
- else {
- System.out.println("Точка M не принадлежит множеству D");
- }
- }
- }
Add Comment
Please, Sign In to add comment