Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int a = in.nextInt();
- int b = in.nextInt();
- int c = in.nextInt();
- if (-1000 <= a && a <= 1000 && -1000 <= b && b <= 1000 && -1000 <= c && c <= 1000) {
- if (a >= b && a >= c) {
- if (b >= c) {
- System.out.printf("%d %d %d", a, b, c);
- } else {
- System.out.printf("%d %d %d", a, c, b);
- }
- }
- if (b >= a && b >= c) {
- if (a >= c) {
- System.out.printf("%d %d %d", b, a, c);
- } else {
- System.out.printf("%d %d %d", b, c, a);
- }
- }
- if (c >= a && c >= b) {
- if (b >= a) {
- System.out.printf("%d %d %d", c, b, a);
- } else {
- System.out.printf("%d %d %d", c, a, b);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement