#include<iostream>
using namespace std;
int main()
{
    char a[15];
    int j=0,i,k=0,t=0,g=0,h=0;
    gets(a);
    for(i=0;i<15;i++)
    {if('A'<a[i]&&a[i]<'Z')j++;
    else if(a[i]<'z'&&a[i]>'a')k++;
    else if(a[i]<'9'&&a[i]>='0')h++;
    else if(a[i]==' ')t++;
    else g++;
    }
    cout<<j<<endl;
    cout<<k<<endl;
    cout<<h<<endl;
    cout<<t<<endl;
    cout<<g<<endl;字符串长度255是多少个汉字
   
    return 0;
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。