If smb. could help and explain why one of reqiarment doesn't pass(if two number are equal, display them) , I would be very grateful,
part of my code:
else if (number1 == number2 && number1 != number3)
System.out.println(number1 + " " + number2);
else if (number2 == number3 && number1 != number3)
System.out.println(number2 + " " + number3);
package com.codegym.task.task04.task0417;
/*
Do we have a pair?
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String inputText1 = reader.readLine();
int number1 = Integer.parseInt(inputText1);
String inputText2 = reader.readLine();
int number2 = Integer.parseInt(inputText2);
String inputText3 = reader.readLine();
int number3 = Integer.parseInt(inputText3);
if (number1 == number2 && number2 == number3)
System.out.println(number1 + " " + number1 + " " + number1);
else if (number1 == number2 && number1 != number3)
System.out.println(number1 + " " + number2);
else if (number2 == number3 && number1 != number3)
System.out.println(number2 + " " + number3);
}
}