代码如下:
#include<stdio.h>
#include<string.h>
main()
{
char str[40],s,newstr[40];
int i,j=0,m,n;
gets(str);
printf("please output the Original string :");
puts(str);
printf("please input you want delete character :");
s=getchar();
for(i=0;str[i]!='\0';i++)
if(str[i]!=s)
newstr[j++]=str[i];
newstr[j]='\0';
m=strlen(str);
n=strlen(newstr);
if(m==n)
printf("not found\n");
else
puts(newstr);
}