//#include "stdafx.h"//If the vc++6.0, with this line.
#include "stdio.h"
int main(void){
char str[]="The/ qu/ick/ br/own/ fo/x jum/ps /over a l/az/y do/g 12/345/678/90!",c='/';
int i,j;
for(j=i=0;str[i];i++)
if(str[i]!=c)
str[j++]=str[i];
str[j]='\0';
printf("%s\n",str);
return 0;
}
追问表示完全没有看懂??而以一个scanf语句都没有??
追答你的提问说了字符串和删除字符要控制台输入吗?这代码没有任何问题,也切合题意,不要自己看不懂就损别人!你有要求可以续问,不要反过来问我……char str[]="The/ qu/ick/ br/own/ fo/x jum/ps /over a l/az/y do/g 12/345/678/90!",c='/';中str就是要处理的字符串,c='/'就是要删除的字符,这不对?莫名其妙!