' VowelCount Example ' Write a function that will count the number vowels ' in the input string. Imports System.Console Public Module Module1 Public Sub Main() WriteLine(VowelCount("apple")) WriteLine(VowelCount("Mississippi")) WriteLine(VowelCount("xyz")) WriteLine(VowelCount("")) ReadLine() End Sub Public Function VowelCount(ByVal s As String) As Integer Dim count As Integer = 0 Dim i As Integer Dim c As String For i = 0 To s.Length - 1 c = s.SubString(i, 1) If c.IndexOfAny("AEIOUaeiou") = 0 Then count += 1 End If Next Return count End Function End Module