public class ArrayAndRan{
public static void main(String[] args){
int a =0;
int num[] = new int[30];
for(int i=0;i<num.length;i++){
num[i] = (int)(Math.random()*100);
a += num[i];
System.out.print("\t"+num[i]);
if((i+1)%10==0)System.out.println();
}
System.out.println("\n平均数为:"+(a/30));
}
}