Program to extract vowel from the input string


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

  1. Do you still play board games? Are you on Board game geek? If you are interested in a game, go to my BGG profile (huskerdude) and mail me.

    ReplyDelete

Post a Comment

Popular posts from this blog

Check whether the input number is arm-strong or not

Print the factorial value of an input number