int[] s = new int[5];//s数组中存放着需要的数字
Random ra = new Random();
for (int i = 0; i < 5; i++)//遍历数组显示结果
{
s[i] = ra.Next(1,10);
Console.WriteLine(s[i]);
}
Console.ReadKey();
int[] s = new int[5];//s数组中存放着需要的数字
Random ra = new Random();
for (int i = 0; i < 5; i++)//遍历数组显示结果
{
s[i] = ra.Next(1,10);
Console.WriteLine(s[i]);
}
Console.ReadKey();