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 convert plugin assembly (dll) into base 64 bytes using console application (C#).

 using System; using System.IO; using System.ServiceModel.Description; using Microsoft.Rest; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sd...