View Code of Problem 55

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
    int i,j;
    char flag;
	char a[30];
    gets(a);
    scanf("%c",&flag);
    for(i=0;a[i];i++)
    {
    while(a[i]==flag)
    {
      for(j=i;a[j];j++)
      a[j]=a[j+1];
    }
    }
    puts(a);
	system("pause");
	return 0;
}

Double click to view unformatted code.


Back to problem 55