REAL RANDOM IS MEANINGLESS IN PROGRAMMING,
most pseudorandom generators are time-random, i have found sourses for online random generation with a random(g) function where g is the astrical dust of earth on the actual milisec or something like this dont ask me im not in the physics,..... just wanna say its more random and more relyable since its not "predicable".
you may use a simple random prefixed function of any lanquedge.
if you want to use those you can reduse Max by 1 and if output greater or equal with x increase by 1
ie
MAX=10-1
random(MAX,FACTOR)
if a>=4
return a+1
else
return a
1,2,3, (4+1)=5 ..... (9+1)-10
int RAND(MAX,FACTOR)
{
return real_to_int (MAX*FACTOR)
}
//factor being a ! constand ! real number from 0-1, but this wont be real random since for each MAX you get everytime the same output
even if you add the x as a factor ie 1/x=FACTOR you'll still get the same "random" number for each set (MAX,x)
conclution: i cant think of a way to find a random number w/o a time var (or something almost random) and i dont think there is on thats why all programming languedges have time-random functions.