Velocity Reviews > C++ > How to generate 52 different random number??

# How to generate 52 different random number??

Brian
Guest
Posts: n/a

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

Thanks~

Heinz Ozwirk
Guest
Posts: n/a

 04-08-2006
"Brian" <(E-Mail Removed)> schrieb im Newsbeitrag news:(E-Mail Removed) oups.com...
>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

Brian
Guest
Posts: n/a

 04-08-2006
just real numbers

osmium
Guest
Posts: n/a

 04-08-2006
"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~

Tomás
Guest
Posts: n/a

 04-08-2006
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

Victor Bazarov
Guest
Posts: n/a

 04-08-2006
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 the assignment is limited to integral values?

Michiel.Salters@tomtom.com
Guest
Posts: n/a

 04-10-2006

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