Module Module1 Sub Main() 'Progrm to extract the vowels from the input string 'declaring the variables Dim entry, temp, vowels As String Dim index As Integer vowels = "" Console.WriteLine("Enter the string to extract vowels from it") entry = Console.ReadLine() For index = 1 To entry.Length temp = UCase(Mid(entry, index, 1)) If temp = "A" Or temp = "E" Or temp = "I" Or temp = "O" Or temp = "U" Then vowels = vowels & " " & temp End If Next Console.WriteLine("The vowels in the string :" & entry & " are:- ") Console.WriteLine(vowels) Console.ReadKey() End Sub End Module
Comments
Post a Comment