我到底是哪错了啊,麻烦大家看一下!
代码如下:
#include<stdio.h> void main() { int ws,lc; if(s(&ws,&lc)) { printf("there are %d whitespace charactors."ws); printf("\nand %d lowercase letters",lc); } else printf("unexpected end-of-file\n"); } int s(ws,lc) { int *ws,*lc; int c; *ws=*lc=0; while((c=getchar())!=EOF) switch(c) { case' ': case'\t':(*ws)++;break; case'\n':return(1); default:if(c>='a'&&c<='z') (*lc)++; } return(0); }麻烦大家了~