import java.util.Random;
import java.util.Scanner;

public class Hofi {

 public static void main(String[] args) {
  // TODO Auto-generated method stub
  Scanner input = new Scanner(System.in);
  Random rr = new Random();
  int a[]={0},b,sum=0,i;
  System.out.println("몇개 숫자 나올까요?");
  b= input.nextInt();
  for(i=0;i<b;i++){
   a[i]=Math.abs(rr.nextInt());
   System.out.print(a+" ");
   sum+=a[i];
  }
  System.out.printf("\nAverage: %f",(double)sum/b);
   
  
 }

}
이렇게하면 배열에서 문제인거같은데 왜안되는거임?