题解 | #小判断#

小判断

https://ac.nowcoder.com/acm/problem/15452

大家应该都是这么写的。

代码

#include<bits/stdc++.h>
using namespace std;

int main(){
    char ch=getchar();
    if(ch>='0'&&ch<='9') cout<<1<<endl;
    else if(ch>='A'&&ch<='Z') cout<<2<<endl;
    else if(ch>='a'&&ch<='z') cout<<3<<endl;
    else cout<<4<<endl; 
    return 0;
}
全部评论

相关推荐

程序员小白条:找的太晚,别人都是大三实习,然后大四秋招春招的,你大四下了才去实习,晚1年
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务