Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main(){
- int n, i;
- cout << "Test cases =";
- cin >> n;
- char a[n + 1];
- for(i = 1; i <= n; i++){
- cin >> a[i];
- }
- for(i = 1; i <= n; i++){
- if(a[i] >= 48 && a[i] <= 57)
- cout << a[i] << " is a Digit" << endl;
- else if((a[i] >= 65 && a[i] <= 90) ||(a[i] >= 97 && a[i] <= 122))
- cout << a[i] << " is an Alphabet" << endl;
- else{
- cout << a[i] << " is special character" << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement