470,815 Members | 1,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

How to generate 52 different random number??

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

Thanks~

Apr 8 '06 #1
6 1690
"Brian" <ke*********@yahoo.com.hk> schrieb im Newsbeitrag news:11**********************@u72g2000cwu.googlegr 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
Apr 8 '06 #2
just real numbers

Apr 8 '06 #3
"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.
Apr 8 '06 #4
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
Apr 8 '06 #5
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?
Apr 8 '06 #6

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 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Laphan | last post: by
6 posts views Thread by Acacia | last post: by
15 posts views Thread by John Cassidy | last post: by
12 posts views Thread by Jim Michaels | last post: by
9 posts views Thread by Alan Isaac | last post: by
20 posts views Thread by jjmillertime | last post: by
24 posts views Thread by pereges | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.