Feb 26, 2009, 01:23 PM
Something like?:
Code:
int isDuplicate = 0;
int newNumber = your_random_number_function();
// check for duplicate
for(int i = 0; i < 6; i++)
{
if(b[i] == newNumber)
{
isDuplicate = 1;
}
}
if(!isDuplicate)
{
// add to array here
}