//How to check character is vowel or not
#include<stdio.h>#include<conio.h>
void main() {
char ch;
clrscr();
printf("Enter the character:\n");
scanf("%c",&ch);
if(ch=='a'||ch=='A'||ch=='e'||ch=='E'||ch=='i'||ch=='I'||
ch=='o'||ch=='O'||ch=='u'||ch=='U')
{
printf("Enter character is vowel");
}
else
{
printf("Enter character is not vowel");
}
getch();
}
Output:
Enter the character:A
Enter character is vowel
No comments:
Post a Comment