[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Getting randomic integers
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 16 Jan 2010 20:23:10 -0200
> > I could not understand how to get a trully randomic integer. Suppose I need
> > 50 randomic integers each time I call a function. Serching in
>
> Assuming you want to print 50 uniform random integers between 0 and 100:
>
> for i=1,50 do
> print(math.floor(math.random()*100))
> end
Or print(math.random(0,100))