Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- int main()
- {
- char litera;
- printf("Input a character: ");
- int check = scanf("%c", &litera);
- int a = litera >= 'a' && litera <='z';
- switch(litera*check*a)
- {
- case 'a':
- case 'A':
- case 'e':
- case 'E':
- case 'i':
- case 'I':
- case 'o':
- case 'O':
- case 'u':
- case 'U':
- case 'y':
- case 'Y':
- printf("vowel");
- return 0;
- case 0:
- printf("incorrect input");
- return 0;
- default:
- printf("consonant");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement