title: How to write method to calculate average in Swift-playground
body: <p>In swift I'm trying to write a method to calculate the average. Using the method below if i type average(5,10,15) I get infinity displayed in the swift-playforund</p>
  
  <pre><code>func average(numbers: Int...) -&gt; Double {
      var sum = 0
      var count = 0
      for number in numbers {
          sum += number
      }
      var  ave : Double = Double(sum) / Double(count)
      return ave
  }
  </code></pre>