Tuesday, 10 January 2017

Check Whether an Alphabet is Vowel or Consonant using C#

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();
        }
    }
}

No comments:

Post a Comment

How to Setup SLA in CE module

Setting Up SLA (Service Level Agreements) in Dynamics 365 Customer Engagement (CE) A Service Level Agreement (SLA) in Dynamics 365 CE (Cust...