Untitled

                Never    
Ruby
       
starting_number = 5                                                        
# Start with 1 since anything * 0 is 0
val = 1
starting_number.downto(1) do |n|
	# Multiply the previous value * the next value
	# val = 1 * 5
	# (next) val = 5 * 4
        # (next) val = 20 * 3
	val = val * n
end 
puts val

Raw Text