muPad: need 4 random 10 digit numbers. I know i can use the random() function, but how to I get 10 digits instead of 12 digits?
usually you can limit it like random(1,12); would give you random numbers between 1 and 12 if you need random tweleve digit numbers I would make it at least 12 digits like this random(12,1993393); put it to a variable var ranNum0 = random(12,1993392); put the var to a string ranNum0.toString(); and then find the length of the string and split out everything but 12 digits this would make ur number even more random.. var ranNumLen = ranNum0.length(); var newNum0 = ranNum0.splice(-1,ranNumLen+1);....this is sudo code you need to debug it and make it work for javascript the above is probably PHP, Actionscript whatever the codes equivelent is available in most other high level languages. I just don't have time to build and debug it right now. I'm working on an android app and am in java mode not javascript mode. Sorry ahead of time for being messy.
Join our real-time social learning platform and learn together with your friends!