import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.println("Enter the three numbers");
int[] ar= new int[3];
for(int i=0;i<3;i++)
ar[i]=sc.nextInt();
Arrays.sort(ar);
System.out.println("Non-decreasing order :");
for(int i=0;i<3;i++)
System.out.println(ar[i]);
}
}
Get Answers For Free
Most questions answered within 1 hours.