Develop a system that allows 20 characters and produce number of vowels
Module Module1
Sub Main()
Dim nVowels As Integer
Const allVowels As String = "aeiou"
Console.Write("Enter the string: ")
Dim InputString As String = Console.ReadLine()
For i As Integer = 0 To InputString.Length - 1
For j As Integer = 0 To allVowels.Length - 1
If InputString.ToLower()(i) = allVowels(j) Then
nVowels = nVowels + 1
End If
Next
Next
Console.WriteLine("The total number of vowels are: " & nVowels)
Console.ReadLine()
End Sub
End Module
Comments
Leave a comment