Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- int main()
- {
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- char ch;
- cin >> ch;
- if((int)ch>=48 && (int)ch<=57)
- printf("%c is a digit\n",ch);
- else if(((int)ch>=65 && (int)ch<=90)||((int)ch>=97 && (int)ch<=122))
- {
- if(ch=='A' || ch=='a' ||ch=='E' || ch=='e' ||ch=='I' || ch=='i' ||ch=='O' || ch=='o' ||ch=='U' || ch=='u')
- printf("%c is an alphabet: it is an vowel\n",ch);
- else
- printf("%c is an alphabet\n",ch);
- }
- else
- printf("%c is a special character\n",ch);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement