fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5.  
  6. Dim a As Integer = 1
  7. While (a <= 10)
  8. Console.WriteLine(a)
  9.  
  10. a = a + 1
  11.  
  12. End While
  13.  
  14. Console.WriteLine("While loop terminates...")
  15. Console.WriteLine("The current value of a is")
  16. Console.WriteLine(a)
  17.  
  18. Console.WriteLine("-------------------------------")
  19.  
  20. a = 100
  21. Do While (a <= 108)
  22. Console.WriteLine(a)
  23.  
  24. a = a + 2
  25.  
  26. Loop
  27.  
  28. Console.WriteLine("While loop terminates...")
  29. Console.WriteLine("The current value of a is")
  30. Console.WriteLine(a)
  31.  
  32. End Sub
  33. End Class
Success #stdin #stdout 0.08s 13456KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6
7
8
9
10
While loop terminates...
The current value of a is
11
-------------------------------
100
102
104
106
108
While loop terminates...
The current value of a is
110