88问答网
所有问题
用c语言编写一个程序,接受用户输入字符串;编写一个函数,讲用户的指定字符删除,再输出字符串。
用c语言编写一个程序,接受用户输入字符串;编写一个函数,讲用户的指定字符删除,再输出字符串。 很急的啊 谢谢
举报该问题
推荐答案 2014-11-29
# include <stdio.h>
# define N 20
int main(void)
{
char ch[N], find;
int i;
printf("请输入字符串:");
scanf("%s", ch);
printf("请输入你要查找的字符:");
scanf("%c", &find);
for(i=0; i<N; i++)
{
if (ch[i] != find)
putchar(ch[i]);
}
return 0;
}
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://88.wendadaohang.com/zd/tgKa1tgtKBc1KSVV1V.html
相似回答
大家正在搜