@rajeev: Well, i meant a code which generates a random no. between say
2 and 10 at every run of program...not the random code generator...!

eg:

if a=2 b=10
on first run of program, it produces
3
2nd run:
5
3rd run:
4
4th run:
9

all these values dont follow any sequence between program runs..



On 7/31/11, rajeev bharshetty <rajeevr...@gmail.com> wrote:
> *#include<stdio.h>*
> *
> *
> *int main()*
> *{*
> *
> *
> *int x,a,b,i,n;*
> *printf("\n Enter the value of n");*
> *scanf("%d",&n);*
> *printf("\n Enter Psoitive integer a");*
> *scanf("%d",&a);*
> *printf("\n Enter the positisve integer b");*
> *scanf("%d",&b);*
> *for(i=1;i<=15;i++)*
> *{*
> * n= (a*n + b);*
> * printf("%d\n",n);*
> *}*
> *return 0;*
> * *
> * }*
>
> Random code generator ...
> Correct me if i am wrong ....
> thanks
>
> On Sun, Jul 31, 2011 at 3:19 PM, Someshwar Chandrasekaran <
> somseka...@gmail.com> wrote:
>
>> On Sun, Jul 31, 2011 at 3:09 PM, Puneet Gautam <puneet.nsi...@gmail.com>
>> wrote:
>> > Can we write a code to generate random numbers without using rand
>> function..?
>> >
>> > Pls help me on this!!
>>
>> How about operating on some garbage value?
>>
>> Regards,
>> B.C.Someshwar
>>
>>
>> --
>> 'Talk sense to a fool and he calls you foolish.' - Euripides
>>
>> My Blog:  somsekaran.wordpress.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> Regards
> Rajeev N B <http://www.opensourcemania.co.cc>
>
> "*Winners Don't do Different things , they do things Differently"*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to