那大概就是这样
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
int main(){
char str[1000]; //字符串
memset(str,1000,0);
scanf("%s",str);
char ch;
int pos1(0),pos2(0);
char s1[500],s2[500];
memset(s1,500,0);
memset(s2,500,0);
for(int i=0;i
if(ch<='9'&& ch>='0'){ //统计数字个数
s1[pos1++]=ch;
}
if( (ch<='z'&&ch>='a') ||(ch>='A'&&ch<='Z') ){
s2[pos2++]=ch;
}
}
printf("%s\n",s1);
printf("%s\n",s2);
system("pause");
return 0;
}