This is the program from which we can check whether the alphabet is vowel or not.
In this program first the question will ask by the program to user "Enter a Alphabet: " , than user will put the any Alphabet then the program will check the conditions if the alphabet will match (if they are vowel) the condition than the program will print the "Alphabet is vowel".
Else, it will print the "Alphabet is not vowel".
ENJOY CODING !!!!
_______________________________________________________________________________________
Output :
If the Alphabet is vowel than output will be this.
If the Alphabet is not vowel than the output will be this
In this program first the question will ask by the program to user "Enter a Alphabet: " , than user will put the any Alphabet then the program will check the conditions if the alphabet will match (if they are vowel) the condition than the program will print the "Alphabet is vowel".
Else, it will print the "Alphabet is not vowel".
ENJOY CODING !!!!
_______________________________________________________________________________________
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Vowel { class PostSlush { static void Main(string[] args) { char alp; Console.Write("Enter a Alphabet: "); alp = Convert.ToChar(Console.ReadLine()); if (alp == 'a' || alp == 'A' || alp == 'e' || alp == 'E' || alp == 'i' || alp == 'I' || alp == 'o' || alp == 'O' || alp == 'u' || alp == 'U') { Console.WriteLine("\n\n{0} is vowel", alp); } else { Console.WriteLine("\n\n{0} is not vowel", alp); } Console.ReadLine(); } } }
Output :
If the Alphabet is vowel than output will be this.
If the Alphabet is not vowel than the output will be this
Tags:
csharp.net