Generation of Random Numbers

Discussion in 'Ruby' started by Lucas Holland, Sep 9, 2006.

  1. Hello,

    how can I generate random numbers (integers, no floating point numbers)
    using Ruby's standard library?

    Many thanks in advance.

    --
    Posted via http://www.ruby-forum.com/.
     
    Lucas Holland, Sep 9, 2006
    #1
    1. Advertising

  2. On Saturday 09 September 2006 18:59, Lucas Holland wrote:
    > Hello,
    >
    > how can I generate random numbers (integers, no floating point numbers)
    > using Ruby's standard library?
    >
    > Many thanks in advance.


    rand(max)

    For further questions, try searching http://ruby-doc.org/core/

    Alex
     
    A. S. Bradbury, Sep 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. globalrev
    Replies:
    4
    Views:
    782
    Gabriel Genellina
    Apr 20, 2008
  2. Alex Untitled
    Replies:
    11
    Views:
    671
    Giampiero Zanchi
    Nov 16, 2009
  3. PerlFAQ Server

    FAQ 4.10 Why aren't my random numbers random?

    PerlFAQ Server, Feb 12, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    227
    PerlFAQ Server
    Feb 12, 2011
  4. PerlFAQ Server

    FAQ 4.10 Why aren't my random numbers random?

    PerlFAQ Server, Apr 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    262
    PerlFAQ Server
    Apr 27, 2011
  5. VK
    Replies:
    15
    Views:
    1,219
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page