Advertisement
sneyzi

11, 3

Jun 7th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Task3 {
  4.  
  5. public static void main(String[] args) {
  6. Scanner scanner = new Scanner(System.in);
  7. System.out.print("Число 1: ");
  8. int a = scanner.nextInt();
  9. System.out.print("Число 2: ");
  10. int b = scanner.nextInt();
  11. System.out.print("Число 3: ");
  12. int c = scanner.nextInt();
  13. if (a == b || b == c || a == c) {
  14. System.out.println("Cеред чисел є пара рівних.");
  15. } else {
  16. System.out.println("Cеред пар чисел немає рівних.");
  17. }
  18. scanner.close();
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement