C#产生二维随机数
时间:2011-06-15 来源:漂流瓶&子風
Random r = new Random();
int[,] arr = new int[3, 3];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++)
{
arr[i, j] = r.Next(10, 60);//10-60之间
Console.Write(arr[i, j].ToString() + " ");
}
Console.WriteLine();
}
相关阅读 更多 +