Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As _
              System.EventArgs) Handles btnStart.Click
  Dim i As Integer, Sum As Integer, Terminate As Integer
  Dim NewLine As String

  txtResult.Text = ""
  NewLine = Chr(13) & Chr(10)
  Terminate = CInt(txtPasses.Text) ' Docelowa ilość przebiegów
  Sum = 0   ' Czyszczenie sumy operacji

  For i = 1 To Terminate     ' początek pętli
    Sum += i
    txtResult.Text += CStr(Sum) & " (i = " & CStr(i) & ")" & NewLine
  Next i                     ' koniec pętli

End Sub
