View Code of Problem 55

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

Double click to view unformatted code.


Back to problem 55