c++大小写

#include<iostream>
#include<algorithm>

using namespace std;

bool isuupper(char c){
    return (c>='A'&&c<='Z');
}

int main(){
    string s;
    while(getline(cin,s)){
        cout<<count_if(s.begin(),s.end(),isuupper)<<endl;
    }
}

  

posted on   lydstory  阅读(29)  评论(0)    收藏  举报

导航

< 2025年5月 >
27 28 29 30 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
1 2 3 4 5 6 7

统计

点击右上角即可分享
微信分享提示