文章
145
粉丝
217
获赞
21
访问
81.9k
#include <stdio.h>
void Resolve(char *s,char *a,char *b,char *c)
{
int i = 0,j = 0,k = 0,n = 0;
while(s[i]!='\0')
{
if((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z'))
a[j++] = s[i];
else if(s[i] >= '0' && s[i] <= '9')
b[k++] = s[i];
else c[n++] = s[i];
i++;
}
a[j] = '\0';
b[k] = '\0';
c[n] = '\0';
}
int main()
{
char s[100],a[100],b[100],c[100];
gets(s);
Resolve(s,a,b,c);
printf("%s\n",a);
printf("%s\n",b);
printf("%s\n",c);
return 0;
}
登录后发布评论
暂无评论,来抢沙发