Hey,
When I run the program it outputs correctly but is still not passing the last requirement. Please let me know what I am missing. Thanks!
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
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) && (a > c)) {
if (c < b) {
System.out.println(a + " " + b + " " + c);
} else {
System.out.println(a + " " + c + " " + b);
}
System.out.println(a + " " + b + " " + c);
} else if ((b > a) && (b > c)) {
if (c < a) {
System.out.println(b + " " + a + " " + c);
} else {
System.out.println(b + " " + c + " " + a);
}
System.out.println(b + " " + a + " " + c);
} else if ((c > b) && (c > a)) {
if (b < a) {
System.out.println(c + " " + a + " " + b);
} else {
System.out.println(c + " " + b + " " + a);
}
}
}
}