In this program, basically, the characters are the main performer. This "char c" is used to assign the values by the user as input and the if statement will check correspondingly, the vowels. the if else statements are basically checking whether the input is a vowel or not.
Program to check Vowel.
#include<stdio.h>#include<conio.h>
void main()
{ char c;
clrscr();
printf("\n program to check whether input alphabet is vowel or not");
printf("\n\n enter any alphabet : ");
scanf("%c",&c);
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u'||
c=='A' || c=='E'|| c=='I' || c=='O' || c=='u')
{ printf("\n character enterd is a vowel");
}
else printf("\n character is not a vowel");
getch();
}

No comments:
Post a Comment
Guys if you think something is wrong or should be edit than please do comment.