diff --git a/src/Task8.java b/src/Task8.java new file mode 100644 index 0000000..97d4127 --- /dev/null +++ b/src/Task8.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Main { + public static void main(String[] args) { + System.out.println("Задание №8"); + Scanner scan = new Scanner(System.in); + System.out.println("Введите первое число"); + int x = scan.nextInt(); + System.out.println("Введите второе число"); + int y = scan.nextInt(); + if (x % 2 == 0 && y % 2 == 0) { + System.out.println("Yes"); + } else if (x % 2 != 0 && y % 2 != 0) { + System.out.println("Yes"); + } + } +}