All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 9 random digits (Posted on 2003-05-02)
Suppose you want to make a random 9 digit number, using every number from 1 to 9 exactly once. You have a process called random(top) that gives a random number up to top (if top was 5, it would give random numbers from 1 to 5)

a) How could you do this?

b) If top couldn't be more than 9, how could you do this using random(top) only 9 times (or less)?

 See The Solution Submitted by Gamer Rating: 3.4000 (5 votes)

Comments: ( You must be logged in to post comments.)
 Subject Author Date think combonations, not strings paul 2005-12-13 18:09:19 anyone wanna see if i got the right idea? drew 2003-11-24 21:18:45 re: Do it with 1 invocation of random as follows SilverKnight 2003-09-09 23:29:28 Do it with 1 invocation of random as follows Troy Bull 2003-09-09 18:13:26 Solution Federico Kereki 2003-07-14 15:35:14 Array Solution daniel 2003-05-04 15:11:53 re(2): Words too! levik 2003-05-03 13:47:42 re: C++ solution levik 2003-05-03 13:45:29 re(3): Words too! Gamer 2003-05-03 05:01:47 re(2): Words too! Charlie 2003-05-02 16:20:09 re: Yet another solution. Gamer 2003-05-02 12:10:56 Yet another solution. friedlinguini 2003-05-02 11:21:38 C++ of my original idea Gamer 2003-05-02 11:10:16 re: Words too! friedlinguini 2003-05-02 11:02:27 Words too! Gamer 2003-05-02 10:46:14 C++ solution friedlinguini 2003-05-02 10:28:52 re: The goal of this problem.... Charlie 2003-05-02 08:27:21 re: solution Charlie 2003-05-02 08:20:59 The goal of this problem.... Brian Smith 2003-05-02 08:16:58 solution Charlie 2003-05-02 08:11:19

 Search: Search body:
Forums (0)