Здравствуйте, подскажите пожалуйста в чем может быть ошибка в решении данной задачи следующим образом?
package com.javarush.task.pro.task03.task0305;
import java.util.Scanner;
/*
Три числа
*/
public class Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
if (a == b && b == c){
System.out.print(a);
System.out.print(b);
System.out.print(c);
}else if(a == c && b != c){
System.out.println(a);
System.out.print(c);
}else if(a != b && b == c){
System.out.println(b);
System.out.print(c);
}else{
System.out.println(a);
System.out.print(b);
}
//напишите тут ваш код
}
}
package com.javarush.task.pro.task03.task0305;
import java.util.Scanner;
/*
Три числа
*/
public class Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
if (a == b && b == c){
System.out.println(a);
System.out.println(b);
System.out.print(c);
}else if(a == c && b != c){
System.out.println(a);
System.out.print(c);
}else if(a != b && b == c){
System.out.println(b);
System.out.print(c);
}else{
System.out.println(a);
System.out.print(b);
}
//напишите тут ваш код
}
}