Sunday 20 October 2013

Check Vowel or Consonant in C

#include<stdio.h>
#include<conio.h>
void main()
{
 char a;
printf("Enter the character: "); 
scanf("%c",&c); 
if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
  printf("%c is a vowel.",c); 
else
  printf("%c is a consonant.",c); 
}

No comments :

Post a Comment