Advertisement
Hafizur

Untitled

May 23rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. // check whether a character is vowel or consonant
  2. #include<stdio.h>
  3. int main()
  4. {
  5.     char ch;
  6.     printf("Enter a character:");
  7.     scanf("%c",&ch);
  8.     if((ch=='a')||(ch=='e')||(ch=='i')||(ch=='o')||(ch=='u')){
  9.         printf("Character is vowel\n",ch);
  10.     }
  11. else if((ch=='A')||(ch=='E')||(ch=='I')||(ch=='O')||(ch=='U')){
  12.          printf("Character is vowel",ch);
  13. }
  14. else{
  15.     printf("Character is constant\n",ch);
  16. }
  17.  
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement