VB .NET
Slip10
Q.1) Write a Vb.net program to accept a character from keyboard and check whether it is vowel or not. Also display the case of that character. [Marks 20]
Solution
Public Class Slip10
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim c As Char
c = TextBox1.Text
Select Case c
Case "A", "E", "I", "O", "U"
MsgBox(c + " is Vowel and Uppercase")
Case "a", "e", "i", "o", "u"
MsgBox(c + " is Vowel and Lowercase")
Case Else
MsgBox(c + " is not vowel")
End Select
End Sub
End Class
Tags:
VB .NET