示例:
输入:daDSALDdcada3240#
输出:大写字母:5
小写字母:7
数字字符:4
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a;
int big=0,small=0,num=0;
a=getchar();
while(a!='#')
{
if((a>='A')&&(a<='Z')) big++;
else if((a>='a')&&(a<='z')) small++;
else if((a>='0')&&(a<='9')) num++;
a=getchar();
}
cout<<"大写字母:"<<big<<endl;
cout<<"小写字母:"<<small<<endl;
cout<<"数字字符:"<<num;
return 0;
}
————完成!