Random Number Generator
LuXo12
Posts: 31
Hi everyone
I need some help with the random function on basic stamp 2se
My question is if there is a way to generate a random 2 digit number like 1 to 99 is so how would I do it with the random function?
Thanks in advance
I need some help with the random function on basic stamp 2se
My question is if there is a way to generate a random 2 digit number like 1 to 99 is so how would I do it with the random function?
Thanks in advance
Comments
would compute "(R // 99) + 1". This would first give you a remainder between 0 and 98, then add one to that to give you a value between
1 and 99 inclusive.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!