1 条题解
-
0
#include<bits/stdc++.h> using namespace std; string jwx; int a,b,c,d; int main(){ //cin>>jwx; getline(cin,jwx); for(int i=0;i<jwx.size();i++){ if(jwx[i]>='A'&&jwx[i]<='Z') a++; else if(jwx[i]>='a'&&jwx[i]<='z') b++; else if(jwx[i]>='0'&&jwx[i]<='9') c++; else if(jwx[i]==' ') d++; else cout<<jwx[i]<<" "; } cout<<endl; cout<<"大写:"<<a<<endl; cout<<"小写:"<<b<<endl; cout<<"数字:"<<c<<endl; cout<<"空格:"<<d-1<<endl; return 0; }
- 1
信息
- ID
- 1097
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 79
- 已通过
- 17
- 上传者