Hello all:
I know that random( 1,200,1) generates random numbers with the step of 1 ( integer )
random(1,100,0.1) generates random numbers with steps of 0.1.
How to generate decimal numbers with only one decimal place or two ??
You already have it. If you want a decimal number with one decimal place use random(1,100,0.1). If you want two decimal places use random(1,100,0.01).
And if you really want exactly two decimal places and no possibility for fewer, you can combine like :
random(1,100,0.1) + random(0.01,0.09,0.01)
to guarantee something nonzero in the tenths place. Or depending on your preference:
random(10,1000)/10 + random(1,9)/100
Oh, correct ! it is my bad. Thank you :)