Scanner sc = new Scanner ( System.in );
int i = sc.nextInt ();
int j = sc.nextInt ();
int k = sc.nextInt ();
int temp1;
// int temp2;
if(i<j){
if(j<k){
temp1 = k;
k = i;
i = temp1;
System.out.println (i+" "+j+" "+k);
}
}
if(j<i){
if(i<k){
temp1 = i;
i = k;
k = temp1;
System.out.println ("First Swap "+i+" "+j+" "+k);
}
temp1 = j;
j = k;
k = temp1;
System.out.println ("Second Swap "+i+" "+j+" "+k);
}
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 sc = new Scanner ( System.in );
int i = sc.nextInt ();
int j = sc.nextInt ();
int k = sc.nextInt ();
int temp1;
// int temp2;
if(i<j){
if(j<k){
temp1 = k;
k = i;
i = temp1;
System.out.println (i+" "+j+" "+k);
}
}
if(j<i){
if(i<k){
temp1 = i;
i = k;
k = temp1;
}
temp1 = j;
j = k;
k = temp1;
System.out.println (i+" "+j+" "+k);
}
}
}