View Code of Problem 55

#include <stdio.h>
#include <string.h>
int main(){
	char a[1000]={'\0'},b;
	gets(a);
	b=getchar();
	int i=0,j=0;
	for(;j<strlen(a);j++){
		if(a[j]==b) continue;
		else{
			a[i++]=a[j];
		}
	}
	a[i]='\0';
	puts(a);
}

Double click to view unformatted code.


Back to problem 55