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

Home > Algorithms
9 random digits (Posted on 2003-05-02) Difficulty: 3 of 5
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 stringspaul2005-12-13 18:09:19
anyone wanna see if i got the right idea?drew2003-11-24 21:18:45
re: Do it with 1 invocation of random as followsSilverKnight2003-09-09 23:29:28
Some ThoughtsDo it with 1 invocation of random as followsTroy Bull2003-09-09 18:13:26
SolutionSolutionFederico Kereki2003-07-14 15:35:14
Array Solutiondaniel2003-05-04 15:11:53
re(2): Words too!levik2003-05-03 13:47:42
re: C++ solutionlevik2003-05-03 13:45:29
re(3): Words too!Gamer2003-05-03 05:01:47
re(2): Words too!Charlie2003-05-02 16:20:09
re: Yet another solution.Gamer2003-05-02 12:10:56
SolutionYet another solution.friedlinguini2003-05-02 11:21:38
Hints/TipsC++ of my original ideaGamer2003-05-02 11:10:16
re: Words too!friedlinguini2003-05-02 11:02:27
Words too!Gamer2003-05-02 10:46:14
SolutionC++ solutionfriedlinguini2003-05-02 10:28:52
re: The goal of this problem....Charlie2003-05-02 08:27:21
re: solutionCharlie2003-05-02 08:20:59
The goal of this problem....Brian Smith2003-05-02 08:16:58
SolutionsolutionCharlie2003-05-02 08:11:19
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information