System.out.print("First number: ");
int a = Integer.parseInt(reader.readLine());
System.out.print("Second number: ");
int b = Integer.parseInt(reader.readLine());
System.out.print("Third number: ");
int c = Integer.parseInt(reader.readLine());
if (???????) {
System.out.println("Two are equal and one is different");
}else{
System.out.println("....");
}
I don’t know what should be in the if condition.
>Solution :
One of posibilities can be:
if ((a == b && b != c) || (a == c && a != b) || (b == c && c != a))
More: How to check if two out of three values are the same?