fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. char input, vowels[] = "aeiou", upperVowels[] = "AEIOU", consonants[] = "bcdfghjklmnopqrstuvwxyz", upperConsonants[] = "BCDFGHJKLMNPQRSTVWXYZ";
  6. printf("Enter the symbol: ");
  7. scanf("%c", &input);
  8. if (strchr(vowels, input) != 0) printf("vowels!");
  9. else if (strchr(upperVowels, input) != 0) printf("Upper vowels!");
  10. else if (strchr(consonants, input) != 0) printf("Consonants!");
  11. else if (strchr(upperConsonants, input) != 0) printf("Upper Consonants!");
  12. else printf("You entered another character!");
  13. }
  14.  
  15. //https://pt.stackoverflow.com/q/404274/101
Success #stdin #stdout 0s 4256KB
stdin
D
stdout
Enter the symbol: Upper Consonants!