View Code of Problem 55

#include <stdio.h>
#include <string.h> 
int main()
{
	char str[100];
	char c;
	int i,j;
	gets(str);
	c=getchar();
	for(i=0;i<(strlen(str));i++)
	{
		if(str[i]==c)
		{
			for(j=i;j<strlen(str);j++)
				str[j]=str[j+1];
			i--;

		}
	}
	puts(str);
	return 0;


}

Double click to view unformatted code.


Back to problem 55