View Code of Problem 55

#include<bits/stdc++.h>
using namespace std;



int main() {

	string s;
	getline(cin,s);
	char c;
	cin>>c;
	while(s.find(c)!=-1){
		int k=s.find(c);
		s.erase(k,1);
	} 
	cout<<s<<endl;
	return 0;
}

Double click to view unformatted code.


Back to problem 55