Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char ch;
- printf("Enter any character: ");
- scanf("%c", &ch);
- if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
- {
- printf("\n'%c' is alphabet.\n", ch);
- {
- if (ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u' || ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U')
- {
- printf("vowel");
- }
- else
- printf("Consonant");
- }
- }
- else if(ch >= '0' && ch <= '9')
- {
- printf("\n'%c' is digit.\n", ch);
- }
- else
- {
- printf("\n'%c' is special character.\n", ch);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement