September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
24
Task/Even-or-odd/Visual-Basic-.NET/even-or-odd.visual
Normal file
24
Task/Even-or-odd/Visual-Basic-.NET/even-or-odd.visual
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Module Module1
|
||||
|
||||
Sub Main()
|
||||
Dim str As String
|
||||
Dim num As Integer
|
||||
While True
|
||||
Console.Write("Enter and integer or 0 to finish: ")
|
||||
str = Console.ReadLine()
|
||||
If Integer.TryParse(str, num) Then
|
||||
If num = 0 Then
|
||||
Exit While
|
||||
End If
|
||||
If num Mod 2 = 0 Then
|
||||
Console.WriteLine("Even")
|
||||
Else
|
||||
Console.WriteLine("Odd")
|
||||
End If
|
||||
Else
|
||||
Console.WriteLine("Bad input.")
|
||||
End If
|
||||
End While
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
Loading…
Add table
Add a link
Reference in a new issue