how to create a limit with a random value function, for example a limit of 25-45?
For further actions, you may consider blocking this person and/or reporting abuse
how to create a limit with a random value function, for example a limit of 25-45?
For further actions, you may consider blocking this person and/or reporting abuse
LATEEF -
Željko Šević -
Davide Fornelli -
Kelven Rubalaine -
Top comments (4)
You can use something like
random_value = 25 + (45 - 25) * random();
Where random() is method call that generates a random number between 0 and 1. Usually every language supports some kind of random() implementation. You need to find this implementation in your preferred language.
(45 - 25)
defines your range and the upper limit.While adding 25 will ensure your lower limit.
thank you so much
You want to do it in wich language ?
c++