Loops in Visual Basic

A FOR loop allows you to specify a starting value for a variable, an end value, and the amount you want to change, or increment. The first format does not specify an increment: it will increment by +1:
For <variable> = <start value> to <end value>
Next <variable>

Using the example below modify the code to print each of the sequences below:


-5, -4, -3, -2, -1, 0


Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.ListBox1.Sorted = False
        For num As Integer = 0 To 5
    End Sub
End Class

NEXT: Step: change the increment