Random number generator in a given range and quantity - Forum

Forum Navigation
You need to log in to create posts and topics.

Random number generator in a given range and quantity

Good day!

I want to make a random number generator for myself in a given range and quantity (usually I need two random numbers, but may need more).

I know how to do it in VisualNEO Win, but how to repeat it in VisualNEO Web?

The screenshot shows the working code from VisualNEO Win, and separately VisualNEO Web project (I attach it to this post).

I need it to not generate zero, so I use the RandomEx command.
I need the generated numbers not to repeat (this is not in the code yet).
I need each generated number to be displayed on a new line in the text field (I used line feed characters for this).

Uploaded files:
  • You need to login to have access to uploads.

@vadim what I do to generate not repetitive random numbers in a given range:

CreateEmptyArray [values]
CreateEmptyArray [randomValues]
SetVar [min] 10
SetVar [max] 20
Loop [min] [max] [n]
  ArrayAddItem [values] [n]
EndLoop
ArrayShuffle [values] [randomValues]

You will get the non repetitive numbers into [randomValues]

Regards.

Vadim and farhad2008 have reacted to this post.
Vadimfarhad2008

@luishp

Luis, thank you so much!

luishp has reacted to this post.
luishp