Create simple application which will check the vowel using switch case
Create simple application which will check the vowel using switch case
code:
char ch;
Console.WriteLine("Enter Letter To Check:");
ch = Convert.ToChar(Console.ReadLine().ToLower());
switch (ch)
{
case 'i':
Console.WriteLine("i is vowel Alphabet");
break;
case 'a':
Console.WriteLine("a is vowel Alphabet");
break;
case 'o':
Console.WriteLine("o is vowel Alphabets");
break;
case 'u':
Console.WriteLine("u is vowel Alphabets");
break;
case 'e':
Console.WriteLine("e is vowel Alphabets");
break;
default:
Console.WriteLine("{0} is not vowel alphabet",ch);
break;
}
output:
Comments
Post a Comment