Answer to Question #14765 in C# for Miths

Question #14765
A program to identify whether a character entered by a user is a vowel or a consonant?
1
Expert's answer
2012-09-13T10:48:14-0400
char letter;

letter = (char) Console.Read(); // get a char




if(letter.toLower().equals("a") || letter.toLower().equals("e") || letter.toLower.equals("i") || letter.toLower().equals("o") ||
letter.toLower().equals("u"))

Console.writeline("The character is a vowel");

else

Console.writeline("The character is a consonant");

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
26.03.13, 10:47

You're welcome. We are glad to be helpful. If you really liked our service please press like-button beside answer field. Thank you!

Miths
23.03.13, 17:19

THank u so much i know its a simple program i am just learning.....so again thank u....

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS