void fun(char str[],char ch)
{ int i,j;
for(i=0;str[i]!='\0';i++)
if(str[i]==ch)
{
for(j=i;str[j]!='\0';j++)
str[j]=str[j+1];
}
}
int main()
{ char str[100],ch;
printf("enter a string :"); // 不需要提示語的話刪去此行
gets(str);
printf("enter you want delete letter : ");// 不需要提示語的話刪去此行
ch=getchar();
fun(str,ch);
printf("%s\n",str);
return 0;
}