Using the While structure to demonstrate counter-controlled repetition. : Counter Controlled Repetition « Statements « VB.Net Tutorial






Module Tester

    Sub Main()
        Dim counter As Integer = 2

      While counter <= 10 
         Console.Write(counter & " ")
         counter += 2 
      End While

    End Sub 

End Module
2 4 6 8 10








4.15.Counter Controlled Repetition
4.15.1.Using the While structure to demonstrate counter-controlled repetition.
4.15.2.Using the For/Next structure to demonstrate counter-controlled repetition.