How would you generate a random number with in the specified limits?
-
I know the algorithm to generate the random numbers where you multiply, divide a unique number(say current time). But, what about in between the numbers? This is how I think can be done, do the same thing as mentioned above in an infinite loop until a number is generated in the specified limits. But, I think the process is a bit boring! So, is there any better/cool solution to it? Please, give the algorithm too!
-
Answer:
Check out this site. Might Help You. http://www.random.org/ You must be signed in to read this answer.Connected to GoogleConnected to FacebookBy continuing you indicate that you have read and agree to the . Loading account...Complete Your ProfileFull NameChecking...EmailChecking...PasswordChecking...By creating an account you indicate that you have read and agree to the .
Sarthak Agarwal at Quora Visit the source
Other answers
http://en.wikipedia.org/wiki/Linear_congruential_generator It takes the form This generates random numbers up to a maximum value of 'm' Suppose you want to generate values between 'min' and 'max' Choose m = max - min Add min to the generated number
Vaidu Iyer
Related Q & A:
- How do I manipulate a large number of moving platforms?Best solution by Electrical Engineering
- How can I convert a string number to a number in Perl?Best solution by Stack Overflow
- How can I get a Vanity number?Best solution by phonenumberguy.com
- How do I save a large number of incoming e-mails to my computer in one go?Best solution by Yahoo! Answers
- How do you block a phone number from calling you?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.