Generating Random numbers


#1

I need to generate random numbers between 0 and 19 ( 20 questions )

I´m using Int( inpQtdQuestoes.value * Rnd) ) but it never generate the number 0, it´s because I´m using the INT() function ?:

Tjanks in advance !


#2

How about Fix(Rnd*19)


#3

I’ll try it, thank you so much!


#4

It worked so fine !! !! !!


#5

I’m not sure you will ever get 19.


#6

Use Round(Rnd*19) instead


#7

It´s Worked fine ! It´s including the number 0 on the generation, it´s
important, because the arrays begin with “0” as index , instead of 1 !

Thank you so much for the help !

RICARDO CASSOLATTO

Business Consultant
sintetik@gmail.com / 21 98196-0504

FastMobile
http://fastmobile.info
http://www.facebook.com/ricardo.cassolatto
https://br.linkedin.com/in/ricardo-cassolato-9ba225