lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > 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))