怎么从输入一堆数字小写字母大写字母当中去掉数字或者小写字母或者大写字母?
#include<stdio.h>unsigned str_length(const char str[])
{
unsigned len =0;
while(str[len])
len++;
return(len);
}
void del(char str[], char moji_begin, char moji_end)
{
for(int i=0;i<str_length(str);i++){
if (str[i] < moji_begin || str[i] > moji_end)
printf("str[i]");}
}
int main()
{
char str[100];
printf("输入字符:");
scanf("%s",str);
printf("消除数字。");
printf("str=%c",del(str, '0','9'));
printf("消除小写字母。");
printf("str=%c",del(str, 'a','z'));
printf("消除大写字母。");
printf("str=%c",del(str, 'A','Z'));
return(0);
}