Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
C# program to find the given character is vowel or not vowel
26026 Views
Function 
This program is used to find the given character is vowel or not vowel.Switch condition used here.
Code
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;
	
	namespace checkVowel
	{
	   class Program
	   {
	       //2. Write a program to check whether the input alphabet is a vowel or not.
	       static void Main(string[] args)
	       {
	           Console.WriteLine("Enter a Alphabet");
	           char ch = Convert.ToChar(Console.ReadLine().ToLower());
	           switch (ch)
	           {
	                case 'a':
	                   Console.WriteLine("It is vowel");
	                   break;
	               case 'i':
	                   Console.WriteLine("It is vowel");
	                    break;
	               case 'o':
	                   Console.WriteLine("It is vowel");
	                   break;
	               case 'u':
	                   Console.WriteLine("It is vowel");
	                   break;
	               case 'e':
	                   Console.WriteLine("It is vowel");
	                   break;
	               default:
	                   Console.WriteLine("It Is Not Vowel");
	                   break;
	            }
	           Console.ReadKey();
	       }
	   }
	}
Output 
Previous Topics
Previous lessons of current book.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details