文章
38
粉丝
11
获赞
2
访问
31.0k
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
while(getline(cin,s)){
int len = s.size();
for(int i = 0;i < len;i++){
if(i == 0) s[i] = toupper(s[i]);
else if (s[i - 1] == ' ' || s[i - 1] == '\t' || s[i - 1] == '\r' || s[i - 1] == '\n' && isalpha(s[i])) s[i] = toupper(s[i]);
}
cout << s << endl;
}
}
登录后发布评论
暂无评论,来抢沙发