View Code of Problem 55

#include<stdio.h>
int main()
{
	char a[1000];
	char str;
	gets(a);
	str=getchar();
	int i,j;
	for(i=0;a[i]!='\0';i++)
	{
		if(a[i]==str)
		{
         for(j=i;a[j]!='\0';j++)
		 {
			 a[j]=a[j+1];
		 }
		 i--;
		}
	}
	puts(a);
	return 0;
}

Double click to view unformatted code.


Back to problem 55