nikitaxe132

Untitled

Sep 24th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package com.company;
  2. import java.util.Scanner;
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         System.out.println("Введите координату x");
  7.         double x = 0;
  8.         x = scanner.nextInt();
  9.         System.out.println("Введите координату y");
  10.         double y = 0;
  11.         y = scanner.nextInt();
  12.         if ((x + y <= 1) && (2 * x - y <= 1) && (y>=0)) {
  13.             System.out.println("Точка M принадлежит множеству D");
  14.         }
  15.         else {
  16.             System.out.println("Точка M не принадлежит множеству D");
  17.         }
  18.     }
  19. }
Add Comment
Please, Sign In to add comment