On Wed, Dec 9, 2009 at 6:29 AM, johnmatthews2000 <[email protected]> wrote:
> --- In [email protected], "Bill Cunningham" <bill...@...> wrote:
>>
>> Now where do I stick the modulus at here to get single digit numbers?
>
> (with corrections)
>
>  printf("%i\n", rand() % 10);

http://c-faq.com/lib/randrange.html

-- 
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

Reply via email to