Re: LZ: Routine Help Again
[Prev][Next][Index][Thread]
Steve Peterson wrote:
>
> Ok, I know I posted this before, but the answers I got weren't
> specific enough for my purposes.
>
> In my MineHunt program, I generate a random number between 0 and
> 139. I need to be able to tell if any number ends in a 0 or
> a 9 (9, 20, 59, etc). This routine needs to be such that if I do
> get one of these numbers then I can simply regenerate a new one.
> Speed is not a consideration, but size definatly is.
>
> I appreciate your help
Do a modulus division by 10. The result will be the remainder. Ie 59 mod
10 = 9.
References: