文章
145
粉丝
217
获赞
21
访问
83.9k
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void Initial_B(char *s)
{
int i = 0,j;
while(s[i] != '\0')
{
j = i;
// while((s[j] >= 'a' && s[j] <= 'z') || (s[j] >= 'A' && s[j] <= 'Z'))
while(s[j] != ' ' && s[j] != '\t' && s[j] != '\r' && s[j] != ',' && s[j] != '.' && s[j] != '\n')
j++;
if(j > i && (s[i] >= 'a' && s[i] <= 'z')) s[i] = s[i] - 32;
i = j+1;
}
}
int main()
{
char *s = (char *)malloc(100*sizeof(char));
while(gets(s)!= NULL)
{
Initial_B(s);
puts(s);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发