1 条题解

  • 1
    #include<bits/stdc++.h>
    using namespace  std;
    string n;
    int num,wor,oth; 
    int  main( ) 
    {
        getline(cin,n);
        for (int i=0;i<n.size()-1;i++)
        {
            if (isdigit(n[i]))
                num++;
            else if (islower(n[i]))
                wor++;
            else
                oth++;
        }
        cout<<"Numbers:"<<num<<endl;
        cout<<"Words:"<<wor<<endl;
        cout<<"Others:"<<oth<<endl;
        return 0;   
    }
    
    
  • 1

信息

ID
1730
难度
5
分类
(无)
标签
递交数
19
已通过
13
通过率
68%
被复制
5
上传者