типа так.
int Randomize (unsigned char jlow,unsigned char jhigh)
{
static unsigned long iran;
unsigned long rand_a=106;
unsigned long rand_c=1283;
unsigned long rand_m=6075;
int jran;
// integer jran between jlow and jhigh
iran=(iran*rand_a+rand_c)%rand_m;
return jran=jlow+((jhigh-jlow+1)*iran)/rand_m;
}