View Code of Problem 55

#include<stdio.h>
#include<string.h>
int main()
{
	char str[100];
	char str1[100];
	gets(str);
	char c;
	scanf("%c",&c);
//	int n=strlen(str);
//	for(int i=0;i<n;i++)
//	{
//		if() 
//	}
	int i=0;
	int x=0;
	while(str[i]!='\0')
	{
		if(str[i]!=c) 
		{
			str1[x]=str[i];
			x++;
		}
		i++;
	}
	puts(str1);
	return 0;
}

Double click to view unformatted code.


Back to problem 55