文章
47
粉丝
109
获赞
9
访问
31.7k
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char s[105];
while (gets(s) != NULL) {
int len = strlen(s);
if (s[0] >= 'a' && s[0] <= 'z') {
s[0] = s[0] - 32;
}
for (int i = 0; i < len; i++) {
if ((s[i] == ' '|| s[i] == '\t' || s[i] == '\r' || s[i] == '\n')&&(s[i+1]>='a'&&s[i+1]<='z')) {
s[i + 1] -= 32;
}
}
puts(s);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发