SHARE
TWEET

vowel or consonant

Mahmud33 May 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     char chr;
  5.     printf("Input the alphabet: ");
  6.     scanf("%c", &chr);
  7.  
  8.     if(chr=='a' || chr=='e' || chr=='i' || chr=='o' || chr=='u' ||
  9.         chr=='A' || chr=='E' || chr=='I' || chr=='O' || chr=='U'){
  10.             printf("It's vowel");
  11.         }
  12.     else if(( chr>='a' && chr <= 'z' ) || ( chr>='A' && chr <= 'Z' )) {
  13.         printf("It's consonant");
  14.     }
  15.     else{
  16.         printf("Not vowel or consonant");
  17.     }
  18.  
  19.     return 0;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top