Exercise
Vowel - if
Objetive
Write a Visual Basic (VB.Net) program to ask the user for a symbol and respond if it's a vowel (in lowercase), a digit, or any other symbol, using "if".
Code
Imports System
Public Class exercise61
Public Shared Sub Main()
Dim symbol As Char
Console.Write("Enter a symbol: ")
symbol = Convert.ToChar(Console.ReadLine())
If (symbol = "a"c) OrElse (symbol = "e"c) OrElse (symbol = "i"c) OrElse (symbol = "o"c) OrElse (symbol = "u"c) Then
Console.WriteLine("It's a lowercase vowel.")
ElseIf (symbol >= "0"c) AndAlso (symbol <= "9"c) Then
Console.WriteLine("It's a digit.")
Else
Console.Write("It's another symbol.")
End If
End Sub
End Class