#include<stdio.h> int main() { char str1[100],str2[100]; char c; int i,j=0; gets(str1); scanf("%c",&c); for(i=0;str1[i]!='\0';i++) { if(str1[i]!=c) str2[j++]=str1[i]; } str2[j]='\0'; puts(str2); }
Double click to view unformatted code.