as such there is no specific method to generate random number but if you
have to implement it then you can generate a pseudo random generator
using cur_time_value_in_mili_seconds mod n.

On Mon, Sep 19, 2011 at 9:24 PM, Don <dondod...@gmail.com> wrote:

> The most common way that it works would be that random(n) returns the
> equivalent of a random integer mod n, so 0<=x<n. But there is no
> standard for how they work, so know what you are dealing with.
>
> Don
>
> On Sep 19, 10:12 am, prasanth n <nprasnt...@gmail.com> wrote:
> > @don:
> > suppose if give like random(5)-> it must give any number between 0 and
> 5..
> >
> >
> >
> > On Mon, Sep 19, 2011 at 8:22 PM, Don <dondod...@gmail.com> wrote:
> > > You mean a pseudo-random generator.
> > > Without special hardware you won't get a real random generator.
> > > Use Mersenne Twister.
> >
> > > Don
> >
> > > On Sep 19, 9:43 am, prasanth n <nprasnt...@gmail.com> wrote:
> > > > anyone give an algorithm of how to generate a random
> number..probability
> > > of
> > > > occurrence of each no should be the same..
> >
> > > > --
> > > > *prasanth*
> >
> > > --
> > > 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.
> >
> > --
> > *prasanth*
>
> --
> 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