Array = new int[7];
Random rndnum = new Random(DateTime.Now.Millisecond);
for (int i = 0; i < Array.Length; i++)
{
temp = rndnum.Next(1, 7);
if (!Array.Contains(temp))
{
Array[i] = temp;
}
temp = 0;
}
Example of output: 2 4 1 0 5 0 0

New Topic/Question
Reply



MultiQuote







|