#include <stdio.h>

int main(void)
{
char str[100];
int i, j, c;

printf("文字列を100文字以内で入力してください\n");
scanf("%s", str);

printf("どの文字を削除いたしますか?");
scanf(" %c", &c);

for(i=j=0; str[i]; i++) if(str[i]!=c) str[j++] = str[i];
str[j] = '\0';

printf("%s\n", str);

printf("削除した文字は%d文字です\n", i - j);

return 0;
}