using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SwitchCase
{
class Switch
{
static void Main(string[] args)
{
Console.WriteLine("Enter a Character");
char ch = Convert.ToChar(Console.ReadLine());
switch (ch)
{
case 'a':
Console.WriteLine("Vowel");
break;
case 'e':
Console.WriteLine("vowel");
break;
case 'i':
Console.WriteLine("Vowel");
break;
case 'o':
Console.WriteLine("Vowel");
break;
case 'u':
Console.WriteLine("Vowel");
break;
default:
Console.WriteLine("consonant");
break;
}
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SwitchCase
{
class Switch
{
static void Main(string[] args)
{
Console.WriteLine("Enter a Character");
char ch = Convert.ToChar(Console.ReadLine());
switch (ch)
{
case 'a':
Console.WriteLine("Vowel");
break;
case 'e':
Console.WriteLine("vowel");
break;
case 'i':
Console.WriteLine("Vowel");
break;
case 'o':
Console.WriteLine("Vowel");
break;
case 'u':
Console.WriteLine("Vowel");
break;
default:
Console.WriteLine("consonant");
break;
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment