View Code of Problem 55

#include<stdio.h>
main()
{
	char str[100],c;
	int i,k;
	gets(str);
	scanf("%c",&c);
	for(i=0;str[i]!='\0';i++){
		if(str[i]==c){
			for(k=i;str[k]!='\0';k++){
				str[k]=str[k+1];
			}
			i--;
		}
	}
	puts(str);
}

Double click to view unformatted code.


Back to problem 55