Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <ctype.h>
- using namespace std;
- int main() {
- char s[1000];
- cin >> s;
- char c;
- cin >> c;
- char s2[1000];
- int idx = 0;
- for(int i = 0; i < strlen(s); i++) {
- if(s[i] != c) {
- s2[idx] = s[i];
- idx++;
- }
- }
- cout << s2 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement