Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //control statement
- //CODE 3:
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- char a;
- cin >> n;
- for(int i=1; i<=n; i++)
- {
- cin >> a;
- int c = a;
- if(c>64 && c<123){
- cout << a << " is an Alphabet : ";
- if(a=='A' || a=='E' ||a=='I' || a=='O' || a=='U' || a=='a' || a=='e' || a=='i' || a=='o' || a=='u')
- cout << "It is an Vowel" << endl;
- else cout << "It is a Consonant" << endl;
- }
- else if(c>47 && a<58)
- cout << a << " is a Digit" << endl;
- else if(c>57 && c<65)
- cout << a << " is a special character" << endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment