fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5. For a As Integer = 1 To 10
  6. Console.WriteLine(a)
  7. Next
  8.  
  9. Console.WriteLine("-----------------------")
  10.  
  11. Dim i As Integer
  12. For i = 100 to 105
  13. Console.WriteLine(i)
  14. Next
  15.  
  16. Console.WriteLine("-----------------------")
  17.  
  18. For a As Integer = 1 to 10 Step 2
  19. Console.WriteLine(a)
  20. Next
  21.  
  22. Console.WriteLine("-----------------------")
  23.  
  24. For a As Integer = 1 To 10
  25. a = 200 'this is bad programming practice
  26. Console.WriteLine(a)
  27. Next
  28.  
  29. Console.WriteLine("-----------------------")
  30.  
  31. i = 1
  32. For a As Integer = 3 * i to i Step -i
  33. i = 5
  34.  
  35. Console.WriteLine(a)
  36. Next
  37. End Sub
  38. End Class
Success #stdin #stdout 0.07s 13456KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6
7
8
9
10
-----------------------
100
101
102
103
104
105
-----------------------
1
3
5
7
9
-----------------------
200
-----------------------
3
2
1