回复:谁能帮我看看这道 java题??

本帖于 2004-02-06 15:24:48 时间, 由普通用户 old-cotton 编辑

public int roll ()
{ faceValue = (int) (Math.random() * numFaces) % numFaces+ 1;
return faceValue;
}



public int[] frequency(int n)
{
int [] t = new int[numFaces+1];
for(int i=0;i t[roll()]+=1;
return t;

}



--文学城www.wenxuecity.com--
请您先登陆,再发跟帖!