top1编程
← 返回题目
题解

【入门】判断是什么字符

1 条题解

  • 0
    @ 2026-7-28 22:10:05
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        char a;
        cin>>a;
        if(a<='Z'&&a>=65){
            cout<<"upper"; 
        }else if(a<='a'&&a>='Z'){
            cout<<"lower";
        }else{
            cout<<"digit";
        }
        return 0;
    }
    
    • 1