Can someone please explain what's wrong with my code? Is there any error with my code or with the compiler?
Thanks in advance!
package en.codegym.task.pro.task03.task0305;
import java.util.Scanner;
/*
Three numbers
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner sc = new Scanner (System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
sc.close();
if(a == b){
System.out.println(a + " " + b);
}
else if(a == c){
System.out.println(a + " " + c);
}
else if(b == c){
System.out.println(b + " " + c);
}
else if (a == b && a == c){
System.out.println(a + " " + b + " " + c);
}
}
}