Hi am new to programming and I really need some how to check an array to see if a number already exists. I read the tutorials about random number genertors but I am just not getting how to check if the random generator already generated that number somewhere else in the array.

Thanks,

Laurie

You can search for a number easily:

int array[BIG_SIZE];
int n = 0;

// ...

int r = rand();
int i;

for ( i = 0; i < n; i++ ) {
  if ( r == array[i] )
    break;
}

if ( i == n )
  array[n++] = r;