文章
133
粉丝
17
获赞
318
访问
7.9k
#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
string s;
getline(cin, s);
if (s[0] >= 'a' && s[0] <= 'z') {
s[0] = s[0] - 32;
}
for (int i = 1;i < s.length();i++) {
if ((s[i - 1] == ' ' || s[i - 1] == '\t' || s[i - 1] == '\r' || s[i- 1] == '\n') && s[i] >= 'a' && s[i] <= 'z') {
s[i] = s[i] - 32;
}
}
cout << s;
return 0;
}
登录后发布评论
暂无评论,来抢沙发