//以下是本人写的,如有不同关点请联系偶
int[] array = new int[100];
Random r = new Random();
ArrayList myList = new ArrayList();
while (myList.Count < 100)
{
int temp = r.Next(1, 101);
if (!myList.Contains(temp))
{
myList.Add(temp);
}
}
for (int i = 0; i < 100; i++)
{
array[i] = Convert.ToInt32(myList[i]);
}
for (int i = 0; i < array.Length; i++)
{
if (i % 10 == 0)
{
Console.WriteLine();
}
Console.Write(array[i] + "/t"); ;
}
Console.Read();