View Code of Problem 55

#include<bits/stdc++.h>
using namespace std;
int main(){
	char c,tm[1000];
	string s;
	int op = 0;
	getline(cin,s);
//	getchar();
	cin>>c;
	for(int i = 0;i<s.size();i++){
		if(s[i] != c){
			tm[op++] = s[i];
		}
	}
	for(int i = 0;i<op;i++)cout<<tm[i]; 
	return 0;
}

Double click to view unformatted code.


Back to problem 55