Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // check whether a character is vowel or consonant
- #include<stdio.h>
- int main()
- {
- char ch;
- printf("Enter a character:");
- scanf("%c",&ch);
- if((ch=='a')||(ch=='e')||(ch=='i')||(ch=='o')||(ch=='u')){
- printf("Character is vowel\n",ch);
- }
- else if((ch=='A')||(ch=='E')||(ch=='I')||(ch=='O')||(ch=='U')){
- printf("Character is vowel",ch);
- }
- else{
- printf("Character is constant\n",ch);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement