回复:谁能帮我看看这道 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--