public class point{
public class static void main(String[] args)
{
String d;
do{
Scanner s = new Scanner(System.in);
System.out.print("想点同学数目:");
int n=s.nextInt();
MajorClass Maj=new MajorClass( n);
}while("Y".equalsIgnoreCase(d));
}
public class MajorClass {
private int n;
private int ary[]=new int [n];
private string d;
public MajorClass(){}
public void MajorClss( int n){
this.n = n;
public int getI(){
return i;
}
public void setI(){
this.i = i ;
}
for( int a= 0 ;a < =n ; a++ ){
int m=((int)(Math.random()*60)+1);
for( i=0;i<=a;i++){
ary[a]=0;
if(ary[i]==m){
a=a-1;
break;
}
ary[a]=m;
}
}
for( int i=0;i
if(ary[i]>ary[j]){
temp=ary[i];
ary[i]=ary[j];
ary[j]=temp;
}
}
}
System.out.println("被点同学的学号为:");
for( int i=0;i
System.out.print(ary[i]+" ");
if((i+1)%10==0){
System.out.println();
}
}
System.out.print("是否再点一次? Y/N:");
s.nextLine();
d=s.nextLine();
}
}
}