日期:2014-05-17 浏览次数:20790 次
static void GetRandomNumber(out List<int> intArray, out int[] counts)
{
//List<int> intArray = new List<int>();
//int[] counts = new int[5];
Random ran = new Random();
int i = 0;
while (i <= 100)
{
//产生随机数
int num = ran.Next(1, 7);
intArray.Add(num);
//统计出现次数
counts[num - 1]++;
i++;
}
}