判断字符类型
2025-06-28 09:01:36
发布于:浙江
5阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
char a;
int main(){
cin>>a;
if(a>='A'&&a<='Z')cout<<"A";
else if(a>='a'&&a<='z')cout<<'a';
else if(a>='1'&&a<='9')cout<<"0";
else cout<<"other";
return 0;
}
这里空空如也
有帮助,赞一个