package com.codegym.task.task04.task0420; /* Sorting three numbers */ import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { //write your code here Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int d = 0; while (a > b || a > c || b > c) { if (a > b) { d = a; a = b; b = d; if (a > c) { d = a; a = c; c = d; if (b > c) { d = b; b = c; c = d; } } } } System.out.println(a + " " + b + " " + c); } }