View Code of Problem 55

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

Double click to view unformatted code.


Back to problem 55