dimanche 13 mai 2018

How do i get about generating random numbers from specific ranges in C#

I just have a hard time understanding how does the random generator class works, haven't worked with it as much until now where I need to get a random value from specific ranges depending on the user input. For example the user enters any number from 1-4 and I need to generate a number from 5-9, if user enters a number from 5-10 then I need to generate a number from 10-19 and so on. I tried using the random generator class but I keep getting similar values, and after searching online I could not find a solution that I understood properly. Sorry if this is a repetitive post and I appropriate any replies.




Aucun commentaire:

Enregistrer un commentaire