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