#include <iostream>
using namespace std;
int main()
{
string str;
cout << "please enter input str:" << endl;
getline(cin,str);
cout << "str = " << str << endl;
int len =str.size();
int num1 = 0;
int num2 = 0;
int num3 = 0;
int num4 = 0;
int num5 = 0;
for(int i=0; i<len;i++)
{
if(str[i] >='a' && str[i] <= 'z')
{
num1++;
}
else if(str[i] >= '0' && str[i] <= '9')
{
num2++;
}
else if(str[i] >= 'A' && str[i] <= 'Z')
{
num3++;
}
else if(str[i] == ' ')
{
num4++;
}
else {
num5++;
}
}
cout << "小写字符个数:"<< num1 << endl;
cout << "数字个数:"<< num2 << endl;
cout << "大写字符个数:"<< num3 << endl;
cout << "空格个数:"<< num4 << endl;
cout << "其他字符个数:"<< num5 << endl;
return 0;
}