#include <stdio.h> int main() { char s[100]; char x; int j = 0; gets(s); scanf("%c", &x); for (int i = 0; i < strlen(s); i++) { if (s[i] != x) s[j++] = s[i]; } for (int i = 0; i < j; i++) printf("%c", s[i]); return 0; } |
Double click to view unformatted code.