View Code of Problem 55

#include<iostream>
#include<map>
#include<cmath>
using namespace std;
int main(){
	int n;
	string str;
	while(getline(cin,str)){
		char temp;
		cin>>temp;
		for(int i=0;i<str.length();i++){
			if(str[i]==temp){
				str.erase(i,1);
				i--;
			}
		}
		cout<<str<<endl;
	}
		return 0;
}

Double click to view unformatted code.


Back to problem 55