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