ruby random number between

# Step 1: Import the 'Random' module from the Ruby standard library
require 'securerandom'

# Step 2: Generate a random floating-point number between 0.0 and 1.0
random_number = SecureRandom.random_number

# Step 3: Multiply the random number by the desired range (e.g., 100) to get a random number within that range
scaled_random_number = random_number * 100

# Step 4: Convert the result to an integer to obtain a whole number within the desired range
random_integer = scaled_random_number.to_i

# Step 5: Print or use the generated random integer as needed
puts "Random Number: #{random_integer}"