View Code of Problem 55

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main(){
	char a[1000],b[1000];
	char ch;
	gets(a);
	cin>>ch;
	int j=0;
	int len=strlen(a);
	for(int i=0;i<len;i++){
		if(a[i]!=ch)
		b[j++]=a[i];
	}
	b[j]='\0';
	cout<<b;
	return 0;
}

Double click to view unformatted code.


Back to problem 55