回複:誰能幫我看看這道 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--
請您先登陸,再發跟帖!