public class Test
{
public void Sx(int[] t)
{
for(int i = 0;i < t.length;i++)
{
if(t[i] < 10)
{
System.out.print("0"+t[i]+" ");
}
else
{
System.out.print(t[i]+" ");
}
if((i+1) % 6 == 0)
{
System.out.println();
}
}
}
public static void main(String[] args)
{
Test m = new Test();
int a[] = new int[36];
out1: for(int i = 0;i < 36;i++)
{
a[i] = (int)(Math.random() * 36 + 1);
for(int j = 0; j < 36 && j != i;j++)
{
if(a[j] == a[i])
{
i--;
continue out1;
}
}
}
m.Sx(a);
System.out.println();
//Arrays.sort(a);
//冒泡法
int temp;
for(int i=0;i<a.length;i++){
for(int j=0;j+1<a.length-i;j++){
if(a[j]>a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
m.Sx(a);
}
}
{
public void Sx(int[] t)
{
for(int i = 0;i < t.length;i++)
{
if(t[i] < 10)
{
System.out.print("0"+t[i]+" ");
}
else
{
System.out.print(t[i]+" ");
}
if((i+1) % 6 == 0)
{
System.out.println();
}
}
}
public static void main(String[] args)
{
Test m = new Test();
int a[] = new int[36];
out1: for(int i = 0;i < 36;i++)
{
a[i] = (int)(Math.random() * 36 + 1);
for(int j = 0; j < 36 && j != i;j++)
{
if(a[j] == a[i])
{
i--;
continue out1;
}
}
}
m.Sx(a);
System.out.println();
//Arrays.sort(a);
//冒泡法
int temp;
for(int i=0;i<a.length;i++){
for(int j=0;j+1<a.length-i;j++){
if(a[j]>a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
m.Sx(a);
}
}