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 2021-12-02 14:46  lydstory  阅读(36)  评论(0)    收藏  举报

导航