Advertisement
Guest User

Problem - 3 : Vowel or Consonant

a guest
May 24th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6.     char ch;
  7.  
  8.     printf("Enter any Alphabet : ");
  9.     scanf("%c",&ch);
  10.  
  11.     if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U'){
  12.  
  13.         printf("%c is a Vowel\n",ch);
  14.  
  15.     }
  16.  
  17.     else{
  18.  
  19.         printf("%c is  a Consonant\n",ch);
  20.  
  21.     }
  22.  
  23.     return 0;
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement