View Code of Problem 55

#include<stdio.h>
char str[999], ret[999], c;
int count = 0, i, j = 0;
int main()
{
	gets(str);
	c = getchar();
	while(str[count] != '\0')
	{
		count++;
	}
	for (i = 0; i < count; i++)
	{
		if(str[i] != c)
		{
			ret[j] = str[i];
			j++;
		}
	}
	ret[j] = '\0';
	printf("%s", ret); 
	return 0;
 } 

Double click to view unformatted code.


Back to problem 55