8 Program on total number of vowels and consonants in VB.NET

Code:

Module Module1

    Dim a As Char
    Dim b, v, c As Integer
    Sub Main()
        v = 0
        c = 0

        For b = 65 To 90
            a = ChrW(b)

            Select Case a
                Case "A", "E", "I", "O", "U"
                    v += 1
                Case Else
                    c += 1
            End Select

        Next

        Console.WriteLine(v)
        Console.WriteLine(c)
        Console.ReadKey()

    End Sub

End Module

Output:

Previous
Next Post »

1 Comments:

Click here for Comments
Unknown
admin
May 5, 2021 at 4:37 PM ×

Good

Thank You Unknown For Comment.
Reply
avatar