title: Fibonacci Sequence Visual Basic
body: <p>I have a quick question about another Visual Basic assignment I'm working on. I have all the code and everything has gone smoothly so far. The app is meant to display the first 100 Fibonacci numbers in a list box, adding the two previously displayed numbers to get the next in a loop. The only problem is that when I hit the button to display the code, the loop continues, and doesn't just stop at 100 numbers. Where did I go wrong?</p>
  
  <pre><code>Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
      Dim dblA As Double = 0
      Dim dblB As Double = 1
      Dim dblC As Double
      Dim intCounter As Integer
  
      lstSequence.Items.Add(dblA.ToString)
      lstSequence.Items.Add(dblB.ToString)
  
      For intCounter = 1 To 100
          dblC = dblA + dblB
          dblA = dblB
          dblB = dblC
          lstSequence.Items.Add(dblC.ToString)
      Next
  End Sub
  </code></pre>