//字符删除 #include<stdio.h> #include<String.h> int main(){ char str[20],str2[20]; char ch; int length,i,j = 0; scanf("%s\n",&str); scanf("%c",&ch); length = strlen(str); for(i=0;i<length;i++){ if(str[i] != ch){ str2[j] = str[i]; printf("%c",str2[j]); j++; } else continue; } return 0; }
原文地址:https://www.cnblogs.com/Hqx-curiosity/p/12238442.html
时间: 2024-10-31 22:49:19