----- Original Message ----- 
From: "Rick" <[email protected]>
To: <[email protected]>
Sent: Wednesday, December 09, 2009 9:15 AM
Subject: Re: [c-prog] modulus


> At 12/8/2009 10:26 PM, you wrote:
>>     include <stdio.h>
>>     include <time.h>
>>
>>int main(void)
>>{
>>     srand(time(NULL));
>>     printf("%i\n",ran(void));
>>     }
>>
>>Now where do I stick the modulus at here to get single digit numbers?
>>
>>Bill
> 
> printf("%i\n",rand()%10);
> 
> ~Rick 
    Oh yeah thanks I googled and could get exactly what I was looking for.

Bill

Reply via email to