这个程序符合需求,你运行一下
/* Note:Your choice is C IDE */
#include "stdio.h"
void main()
{
char a[100],ch;
char b[100]={0};
int i=0,j=0;
gets(a);
printf("please input the letter you want to delete:\n");
scanf("%c",&ch);
while(*(a+i)!='\0')
{
if(*(a+i)!=ch)
{
*(b+j)=*(a+i);
i++;
j++;
}
else
{
i++;
}
}
*(b+i)='\0';
puts(b);
}
追问不知道您能否详讲解一下这个程序呢?
追答这个,呵呵,不会的加群218691837