View Code of Problem 55

#include<stdio.h>
#include<string.h>
void main(){
	char str[100],c,str1[100];
	int l,i,j=0,k;
	gets(str);
	scanf("%c",&c);
	l=strlen(str);
	for(i=0;i<l;i++){
		if(str[i]!=c){
			str1[j]=str[i];
			j++;
		}
	}
	for(k=0;k<j;k++)
		printf("%c",str1[k]);
}

Double click to view unformatted code.


Back to problem 55