#include int count(char *s){ int k=0,i; for(i=0;s[i];i++) if('a'<=s[i]&&s[i]<='z'||'A'<=s[i]&&s[i]<='Z') k++; return k;}int main(){ char a[256]; gets(a); printf("count=%d\n",count(a)); return 0;}
输入用gets()输出用printf()