View Code of Problem 55

#include <stdio.h>
#include <string.h>
int main(){
	char s[100],c;
	gets(s);
	c=getchar();
	int i,j=0;
	for(i=0;i<strlen(s);i++){
		if(s[i]!=c){
			s[j]=s[i];
			j++;
		}
	}
	s[j]='\0';
	puts(s);
	return 0;
}

Double click to view unformatted code.


Back to problem 55