I founded the solution but it's weird.
In my code, i used only the ">" operator in all my conditions. The last statment couldn't be ok. Then i tried with the ">=" operator.
What i thought was : if 2 numbers are equal but superior to the third, then the 2 numbers would appear first as it was requested.
Is that right or am i wrong ? Because i wrote my algorythm like that : if number "a" was STRICTLY superior to number "b" and number "b" was STRICTLY superior to number "c", displays "a b c". I thought what was request was to strictly separate numbers that are superiors to inferiors numbers.
package fr.codegym.task.task04.task0420;
/*
Tri de trois nombres
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
//System.out.println("Taper a");
short a = sc.nextShort();
//System.out.println("Taper b");
short b = sc.nextShort();
//System.out.println("Taper c");
short c = sc.nextShort();
if (a >= b && b >= c) {
System.out.println(a+" "+b+" "+c);
}
else if (a >= c && c >= b) {
System.out.println(a+" "+c+" "+b);
}
else if (b >= a && a >= c) {
System.out.println(b+" "+a+" "+c);
}
else if (b >= c && c >= a) {
System.out.println(b+" "+c+" "+a);
}
else if (c >= a && a >= b) {
System.out.println(c+" "+a+" "+b);
}
else if (c >= b && b >= a) {
System.out.println(c+" "+b+" "+a);
}
}
}