Ребят, будьте добры, подсобите.
Возможно ли решить таким способом или нужно искать обходные пути?)
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
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) && (b <= c))
System.out.println(c + " " + b + " " + a);
if ((b <= a) && (a <= c))
System.out.println(c + " " + a + " " + b);
if ((a <= c) && (c <= b))
System.out.println(b + " " + c + " " + a);
if ((c <= a) && (a <= b))
System.out.println(b + " " + a + " " + c);
if ((b <= c) && (c <= a))
System.out.println(a + " " + c + " " + b);
if ((c <= b) && (b <= a))
System.out.println(a + " " + b + " " + c);
}
}