View Code of Problem 55

#include<stdio.h>
#include<string.h>

int main()
{
	char str[10000];
	char c;
	int pos = 0;
	
	gets(str);
	c = getchar();
	for(int i = 0; str[i] != '\0'; i++)
		if(str[i] != c)
			str[pos++] = str[i];
	str[pos] = '\0';
	puts(str);
	return 0;
}

Double click to view unformatted code.


Back to problem 55