Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim start As Integer = TextBox1.Text
Dim endn As Integer = TextBox2.Text
Dim tracker As Integer = 1
Label3.Text = start
While start <= endn
start = start + 1
Label3.Text = Label3.Text + "+" + start.ToString
tracker = tracker + start
End While
Label3.Text = Label3.Text + " = " + tracker.ToString
End Sub
End Class

You might also like