Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have an algorithm that depends on the generation of a random number. The thing is very simple: I generate a random number between 0 and 8 and do something different depending on the generated number.
Now I want to change my algorithm so that some numbers are more likely to occur than others: for example i want to have an higher chance of having 2, 6 or 7 then the other numbers. Anyone has a suggestion on how to implement that?
[italic]How beautiful, if Sorrow had not made sorrow more beautiful than Beauty itself.[/italic]