If - Then - Else statement that determines if a given letter is a consonant or a vowel.Write an If - Then - Else statement that determines if a given letter is a consonant or a vowel.
Is this right?
Sub Globals
Private editText1 As EditText
Private btn1 As Button
End Sub
Sub btn1_Click
If editText1= “a” Or editText1=”A” Or editText1=”e” Or editText1=”E” Or editText1=”I” Or editText1=”I” Or editText1=”o” Or editText1=”O” Or editText1=”u” Or editText1=”U” then
Msgbox(“Vowel”,”Result”) Else
Msgbox(“Consonant”,”Result”)
End If
End Sub
Is this right?
Sub Globals
Private editText1 As EditText
Private btn1 As Button
End Sub
Sub btn1_Click
If editText1= “a” Or editText1=”A” Or editText1=”e” Or editText1=”E” Or editText1=”I” Or editText1=”I” Or editText1=”o” Or editText1=”O” Or editText1=”u” Or editText1=”U” then
Msgbox(“Vowel”,”Result”) Else
Msgbox(“Consonant”,”Result”)
End If
End Sub