回複:誰能幫我看看這道 java題??

來源: 2003-12-16 06:17:00 [舊帖] [給我悄悄話] 本文已被閱讀:

// Declare an array to hold the return values
int *freq = new int[numFaces+1];
// Initialize it
for (int a = 0; a freq[a] = 0;
// roll the dice for n times
for(int i = 0; i{
int j;
j = roll();
freq[j] += 1;
}
// return the results
return freq;



--文學城www.wenxuecity.com--