Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Number Problems
#2

Here are a couple examples.



This generates 1 random number.
Macro ( Uniform_Example )
Code:
Copy      Help
int random num
num=5;;edit your number here
random=Uniform(1 num)
out random


and

Macro ( Uniform_Example_Pi )
Code:
Copy      Help
int repeats count num
num=5
repeats=Uniform(1 num)
out "Random repeats = %i" repeats
rep repeats+1
,out count
,count+1

This will generate numbers counting up to the random number.

ie: Random number chosen is 6; counts 0 1 2 3 4 5 6.
Taking on Quick Macros one day at a time


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)