I’d like to generate a random number in a given range depending if the input is +
or -
.
For a positive input I would get a positive number between x and y (4 and 42 actually), for a negative input a number between -6 and -72.
In other words, if the input is +
, then rand(4,42)
, if the input is -
, then rand(-6,-72)
.
I’m just not sure how to string it all together.