Technically speaking there is no true random number generator. We studied it for a month in my C++ Advanced Algorithms course in college

. You could however use srand like bla said and use a null value for time.
Code:
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main()
{
srand(time(NULL));
printf("%d", rand() % 10000);
}
Something like that will generate a number out of 10000 each time you run it. Just put it in a for loop to run it X amount of times.