#include<bits/stdc++.h> using namespace std; int main(){ char c,s[1000],tm[1000]; int op = 0; scanf("%s\n",s); scanf("%c",&c); for(int i = 0;i<strlen(s);i++){ if(s[i]!= c){ tm[op++] = s[i]; } } tm[op] = '\0'; puts(tm); return 0; } |
Double click to view unformatted code.