#include "stdafx.h"
#include "string.h"
void main(void)
{
char src[]="we are learning c language";
char input;
int len=0;
int i;
printf("please input a char:");
scanf("%c"仔伍派,&input);
len=strlen(src);
printf("output:"念贺);
for(i=0;i<橘正len;i++)
{
if(src[i]!=input)
printf("%c",src[i]);
}
printf("\n");
}
把输入的a删了.
please input a char:a
output:we re lerning c lnguge
Press any key to continue