void fun(char *s)
{
int i,j;
/******found********/
for(i=0,j=0;s[i]!='\0';i++)
if(s[j]>='0'&&s[i]<='9')
s[j]=s[i];
/*******found*****/
s[j]="\0";
}
參考答案:void fun(char *s)
{
int i,j;
/******found********/
for(i=0,j=0;s[i]!='\0';i++)
if(s[j]>='0'&&s[i]<='9')
s[j++]=s[i];
/*******found*****/
s[j]="\0";
}
已经修改OK