if (max == a && b>=c) {
System.out.println(a + " " + b + " " + c);
}else if (max == a && c>=b) {
System.out.println(a + " " + c + " " + b);
}else if (max == b && a>=c) {
System.out.println(b+" "+ a + " " + c);
}else if (max == b && c>=a) {
System.out.println(b +" "+ c + " " + a);
}else if (max == c && a>=b) {
System.out.println(c+" "+ a + " " + b);
}else if (max == c && b>=a) {
System.out.println(c+" "+ b + " " + a);
}
package com.javarush.task.task04.task0420;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Сортировка трех чисел
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String number1 = reader.readLine();
String number2 = reader.readLine();
String number3 = reader.readLine();
int a = Integer.parseInt(number1);
int b = Integer.parseInt(number2);
int c = Integer.parseInt(number3);
int list [] = {a, b ,c};
int max = list[0];
for (int i = 0; i < list.length; i++)
{
if (list[i] < max)
max = list[i];
}
if (max == a && b>=c) {
System.out.println(a + " " + b + " " + c);
}else if (max == a && c>=b) {
System.out.println(a + " " + c + " " + b);
}else if (max == b && a>=c) {
System.out.println(b+" "+ a + " " + c);
}else if (max == b && c>=a) {
System.out.println(b +" "+ c + " " + a);
}else if (max == c && a>=b) {
System.out.println(c+" "+ a + " " + b);
}else if (max == c && b>=a) {
System.out.println(c+" "+ b + " " + a);
}
}
}