title: Making ruby calculator run continuously
body: <p>I have made a simple calculator in ruby. However after running once the program stops and has to be re-run. I tried the following but it ended in an infinite loop. How can I write this so that it will run until the users tells it to quit?</p>
  
  <pre><code>puts "Please enter two digits separated by operation you would like to calculate:"
  
  input = gets.chomp.split(' ')
  
  while input != nil
    if input[1] == "+"
      puts input[0].to_i + input[2].to_i
    elsif input[1] == "-"
      puts input[0].to_i - input[2].to_i
    elsif input[1] == "*"
      puts input[0].to_i * input[2].to_i
    else 
      puts input[0].to_i / input[2].to_i
  end
  end
  </code></pre>