0

Hi again,
With silly question...
I read about generating random numbers
random(10); but it gives numbers from 0 to 10 and i need for example from 10 to 100.

I tried random([10..100]); but i can't compile this :/
Could somebody help me?

3
Contributors
7
Replies
9
Views
6 Years
Discussion Span
Last Post by Wolfgan
0

low+random(maximum-low+1)

So

10 + random(100-10+1)

random(10) gives values until 9.

Edited by pyTony: n/a

0

thanks tonyjv, your code worked :)

But another problem ocurred, i haven't thought that random will give me numbers like 11,12,13 etc haha
Im using 20,40,60 etc numbers so yeah tryin to solve this, can someone still help me?

0

read my post i dont need these numbers i only need 20,40,60 etc numbers because my program runs on 20x20 rectangles :)

0

What is the difficulty. You have already prompted all that is required. Think beyond yourself. This is an elementary task.

Edited by Wolfgan: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.