Random Number Generation
Creative
Posts: 11
I have tried using the random number providing the 'seed' value, but i have no idea what it means even after reading through the help topics. I tried to output a random number that ranges from 1 to 9 but with the 'seed' statement, the output number becomes huge etc. 55246, 11253.. without the 'seed' statement, i will get a number repetitively. Please give me some guidance on this problem. Thanks!
Post Edited By Moderator (Chris Savage (Parallax)) : 10/5/2005 2:02:19 PM GMT
Post Edited By Moderator (Chris Savage (Parallax)) : 10/5/2005 2:02:19 PM GMT
Comments
RND//9 + 1
what this does is takes the random number, divides it by 9 and returns the remainder (resulting in a number between 0 and 8) then you add one to shift the number to be between 1 and 9.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10