#include <stdio.h> int main(){ int i,j=0; char str1[100]; char str2[100]; gets(str1); char c; scanf("%c",&c); for(i=0;str1[i]!='\0';i++){ if(str1[i] != c) str2[j++] = str1[i]; } str2[j]=='\0'; puts(str2); } |
Double click to view unformatted code.