ENGLISH VOWELS A,E,I,O,U.
SOURCE
CODE :
using System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace
switchcase1
{
class switch1
{
public void switchcase1()
{
string
str = "";
Console.WriteLine("\nEnter a character to check vowel or not");
str = Console.ReadLine();
Console.WriteLine(str);
switch
(str.ToLower())
{
case
"a":
case
"e":
case
"i":
case
"o":
case
"u":
Console.WriteLine("Vowel");
Console.ReadLine();
break;
default:
Console.WriteLine("Not a Vowel");
Console.ReadLine();
break;
}
}
}
class Program
{
static
void Main(string[]
args)
{
switch1
s = new switch1();
s.switchcase1();
}
}
}
OUTPUT:
Enter a character to check vowel or
not
a
a
its a vowel
No comments:
Write comments