How to generate 52 different random number??

Discussion in 'C++' started by Brian, Apr 8, 2006.

  1. Brian

    Brian Guest

    I hv a school assignment that is to generate 52 different random
    number, where all the numbers must >1 and <53. Pls help~

    Thanks~
    Brian, Apr 8, 2006
    #1
    1. Advertising

  2. Brian

    Heinz Ozwirk Guest

    "Brian" <> schrieb im Newsbeitrag news:...
    >I hv a school assignment that is to generate 52 different random
    > number, where all the numbers must >1 and <53. Pls help~


    What kind of numbers? Natural numbers, rational numbers odr real numbers?

    Heinz
    Heinz Ozwirk, Apr 8, 2006
    #2
    1. Advertising

  3. Brian

    Brian Guest

    just real numbers
    Brian, Apr 8, 2006
    #3
  4. Brian

    osmium Guest

    "Brian" writes:

    >I hv a school assignment that is to generate 52 different random
    > number, where all the numbers must >1 and <53. Pls help~


    Are you sure you are supposed to start with 2?

    Look up "shuffle" on Google.
    osmium, Apr 8, 2006
    #4
  5. Brian

    Tomás Guest

    Brian posted:

    > I hv a school assignment that is to generate 52 different random
    > number, where all the numbers must >1 and <53. Pls help~
    >
    > Thanks~
    >


    Why not search google for C++ Lottery?

    www.planetsourcecode.com might be of help too.


    -Tomás
    Tomás, Apr 8, 2006
    #5
  6. osmium wrote:
    > "Brian" writes:
    >
    >> I hv a school assignment that is to generate 52 different random
    >> number, where all the numbers must >1 and <53. Pls help~

    >
    > Are you sure you are supposed to start with 2?


    Are you sure the assignment is limited to integral values?
    Victor Bazarov, Apr 8, 2006
    #6
  7. Brian

    Guest

    Victor Bazarov wrote:
    > osmium wrote:
    > > "Brian" writes:
    > >
    > >> I hv a school assignment that is to generate 52 different random
    > >> number, where all the numbers must >1 and <53. Pls help~

    > >
    > > Are you sure you are supposed to start with 2?

    >
    > Are you sure the assignment is limited to integral values?


    In fact, Brian has confirmed that real numbers are OK, too. It better
    be,
    since there are only 51 integers >1 and <53. Now, I'm betting that
    Brain hasn't yet figured out what "different real numbers" really
    means.

    HTH,
    Michiel Salters
    , Apr 10, 2006
    #7
    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. Matt
    Replies:
    24
    Views:
    9,339
    Malcolm
    Oct 18, 2004
  2. RayKnight

    Generate a random number

    RayKnight, Apr 29, 2005, in forum: Java
    Replies:
    2
    Views:
    314
    Peter MacMillan
    Apr 29, 2005
  3. Acacia

    Generate a random number

    Acacia, Aug 25, 2003, in forum: C++
    Replies:
    6
    Views:
    539
    Kevin Goodsell
    Aug 26, 2003
  4. globalrev
    Replies:
    4
    Views:
    742
    Gabriel Genellina
    Apr 20, 2008
  5. VK
    Replies:
    15
    Views:
    1,116
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page