im trying to create a list of 20 random numbers that dont repeat the same number. the first loop is good but im having trouble with the imbedded statement it looks something like this
for (int index =0; index < arraysize; index++)
{
prizeNumbers[index] = Math.abs(ran.ne xtInt() %500 + 1);
while ( prizeNumber[index] != prizeNumber[0] threw prizeNumber[index-1])
{
}
}
the underlined is incorrect but thats the idea im going for can i get some help with this?
for (int index =0; index < arraysize; index++)
{
prizeNumbers[index] = Math.abs(ran.ne xtInt() %500 + 1);
while ( prizeNumber[index] != prizeNumber[0] threw prizeNumber[index-1])
{
}
}
the underlined is incorrect but thats the idea im going for can i get some help with this?
Comment