how can I give variables values between 2 numbers?
for example I want to give X values between 20 and 50
|
A variable cxan at an given time only have one value, unless that variable is made for storing more values, like arrays or lists.
To help you we need to know which programming language and what you actually want to achieve. Do you need all that values at the same time, do you want to iterate over them, ...? |
Quote:
|
i dont think your question is possible as is because there are an infinite amount of numbers between 20 and 50. maybe you can modify your question to how to check if the value of X is between 20 and 50:
Code:
[schneidz@hyper ~]$ cat rivelino90.c |
Quote:
|
random whole numbers between 20 and 50:
Code:
expr $RANDOM % 30 + 20 |
All times are GMT -5. The time now is 02:12 PM. |