Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

C-program of checking a alphabet is vowel or consonant



In this C-program we will check that, if an alphabet is vowel or consonant. The alphabet will be taken from the user.color>

input:

The alphabet(i.e : A,b,p etc.)

output:

The alphabet is vowel or consonant

CODE---->


#include
#include
color> void main()color>
{
char ch;
printf("Enter an alphabet:-color>");
scanf("%ccolor>",&ch);
if(ch=='A'||ch=='a'||ch=='E'||ch=='e'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='u'||ch=='U'color>)
{
printf("%c is a vowelcolor>",ch);
}
else
{
printf("%c is consonantcolor>",ch);
}

getch();
}
Note:color>***There is no space or a gap of line between ifcolor> and it's condition [i.e:(ch=='A'||ch=='a'||ch=='E'||ch=='e'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='u'||ch=='U'color>)]***


Don't just read, write it, run it.....color>



This post first appeared on ProgramJoy.blogspot.com, please read the originial post: here

Share the post

C-program of checking a alphabet is vowel or consonant

×

Subscribe to Programjoy.blogspot.com

Get updates delivered right to your inbox!

Thank you for your subscription

×