import java.util.Scanner; public class ok2 {
@SuppressWarnings("resource")
public static void main(String[] args){
System.out.println("please enter some numbers,use space to cut them up"); Scanner cc=new Scanner(System.in); int num=0;
int vd[]; Scanner scan,scan1;
String aa=cc.nextLine();
scan=new Scanner(aa); while(scan.hasNext()){
num++;
String a=scan.next();
}
int[] bbb=new int[num];
vd=bbb; scan1=new Scanner(aa); while(scan1.hasNext()){
num--;
int a;
a=Integer.parseInt(scan1.next());
vd[num]=a;
}
int sum=0;
for(int vv:vd){
sum=sum+vv;
} System.out.print((int)(sum/vd.length)+"#");
int min;
int temp; for (int index = 0; index < vd.length-1; index++)
{
min = index;
for (int cvbb = index+1; cvbb < vd.length; cvbb++)
if (vd[cvbb]<(vd[min]) )
min = cvbb; // Swap the values
temp = vd[min];
vd[min] = vd[index];
vd[index] = temp;
}
for(int ff:vd){
System.out.print(ff+" ");
}
}
}
@SuppressWarnings("resource")
public static void main(String[] args){
System.out.println("please enter some numbers,use space to cut them up"); Scanner cc=new Scanner(System.in); int num=0;
int vd[]; Scanner scan,scan1;
String aa=cc.nextLine();
scan=new Scanner(aa); while(scan.hasNext()){
num++;
String a=scan.next();
}
int[] bbb=new int[num];
vd=bbb; scan1=new Scanner(aa); while(scan1.hasNext()){
num--;
int a;
a=Integer.parseInt(scan1.next());
vd[num]=a;
}
int sum=0;
for(int vv:vd){
sum=sum+vv;
} System.out.print((int)(sum/vd.length)+"#");
int min;
int temp; for (int index = 0; index < vd.length-1; index++)
{
min = index;
for (int cvbb = index+1; cvbb < vd.length; cvbb++)
if (vd[cvbb]<(vd[min]) )
min = cvbb; // Swap the values
temp = vd[min];
vd[min] = vd[index];
vd[index] = temp;
}
for(int ff:vd){
System.out.print(ff+" ");
}
}
}