|
-
Oct 20th, 2003, 02:36 AM
#1
Thread Starter
Fanatic Member
Generate Unique Random Integer in given range
I am sure there must be a function available that can generate a unique random integer in a given range.
Inputs:
Upper limit
Lower Limit
Array of integers between upper and lower limit.
Output:
A random integer that does not exist in the [array of integers between upper and lower limit], but is not greater than the upper limit or not less than the lower limit.
Example:
Upper limit = 10
Lower limit = 1
Input Array = {1,6,2,9,4,3}
An allowed output is an element of the set {5,7,8,10)
If you have the solution I would be most grateful.
I received an email that shows that it does not matter in what sequence letters occur in a word, but providing the first and last letters of the word are the same, then you will be able to read the word correctly without even having to think about the order of the letters. So I am going to use this principle as part of a password generator to generate passwords that are easy for users to remember. An example:
My nmae is Mike and I am a cmptuoer pmeoramrgr.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|