#include
int fun(char *s)
{
int num=0;
char ch;
while((ch=*s++)!='\0')
if((ch<=90 && ch>=65) || (ch>=97 && ch<=122))
num++;
return num;
}
int main ()
{
char s[]="123zbc @ 123w"; /*测试用的字符串(里面可以含空格,特殊符号)*/
int length;
length=fun(s);
printf("字符串含有字母数为: ");
printf("%d",length);
printf("\n");
return 0;
}