例如:
原字符串为:abc12ef5ghij8#%%yz,处理后的字符串为:abcefghijyz
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void dele(char* s)
{
int lena, lenb, i, j;
char b[200];
i = 0; j = 0;
while (s[i] != '\0')
{
if (s[i] >= 'a' && s[i] <= 'z')
{
b[j] = s[i];
j++;
i++;
}
else
i++;
}
b[j] = '\0';
lena = strlen(b);
for (i = 0, j = 0; i < lena || j < lena; i++, j++)
{
s[i] = b[j];
}
s[i] = '\0';
}
int main(int *argc,char *argv[])
{
char s[200];
printf("please input the string s:");
gets(s);
dele(s);
puts(s);
return 0;
}