text: Q:
  
  How to set many variables with gets
  
  I would love to set three variables a, b and c from a single gets line. For example, user entering a line of space-delimited numbers "1 2.2 -3.14" would set a to 1, b to 2.2 and c to -3.14 respectively. I achieve this like so:
  input = gets.strip.split
  a,b,c = input[0].to_f,input[1].to_f,input[2].to_f
  
  Is there a more elegant way to assign array entries to a range of variables? Perhaps something with a splat and a cycle?
  input.each {|entry| *(a..z) = entry }
  
  A:
  
  a,b,c = "1 2.2 -3.14".split.map(&:to_f)
  # => [1.0, 2.2, -3.14]
  b
  # => 2.2
  
  