it does all that they requested.
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner order = new Scanner(System.in);
int a = order.nextInt();
int b = order.nextInt();
int c = order.nextInt();
String s = "";
if(a > b && a > c) {
s += a + " ";
if (b > c) {
s += b + " " + c;
}
else {
s += c + " " + b;
}
}
else if (b > a && b > c) {
s += b + " ";
if (a > c) {
s += a + " " + c;
}
else {
s += c + " " + a;
}
} else {
s += c + " ";
if (a > b) {
s += a + " " + b;
}
else {
s += b + " " + a;
}
}
System.out.print(s);
}
}