My code runs fine - gives the ordinal index of the unique number.
If i input the same value 3 times, nothing prints - but yet the fourth check remains unpassed.
Any ideas?
Thanks in advance.
package com.codegym.task.task04.task0424;
/*
Three numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
if (a != b && a != c) {
System.out.println(1);
}
if (b != a && b != c) {
System.out.println(2);
}
if (c != a && c != b) {
System.out.println(3);
}
//
// if (a == b && a == c) {
// System.out.println("");
// }
}
}