Не проходит по последним двум пунктам. Заранее спасибо.
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.*;
import java.util.*;
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());
//123
int x = Math.min(a, Math.min(b,c));
int y = Math.max(a, Math.max(b,c));
if (a>=x && a<=y)
{
System.out.println(y + " " + a + " " + x);
}
else if(b>=x && b<=y)
{
System.out.println(y + " " + b + " " + x);
}
else if(c>=x && c<=y)
{
System.out.println(y + " " + c + " " + x);
}
}
}