Answers for "ruby random number"

6

ruby generate random number

rand()#that will give you a random float between 0 and 10

rand(num)#that will give you a random integer between 0 and the number num

rand(first...second)#that will give you a random
#integer between first and second
Posted by: Guest on March-05-2021
0

generate 6 digit random number ruby

10.times.map{rand(10)}.join # => "3401487670"
Posted by: Guest on July-23-2020

Browse Popular Code Answers by Language