C Program to Check Whether an Input Character is a Vowel or Consonant
#include<stdio.h>
#include<conio.h>
main()
{
char
ch;
printf("Enter
any character=");
scanf("%c",ch);
if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||ch=='A'||ch=='E'||ch=='O'||ch=='I'||ch=='U')
printf("vowel");
else
printf("consonant");
getch();
}
No comments:
Post a Comment