#include <stdio.h>
#define IN 1
#define OUT 0
int main ()
{
int c,nl,nw,nc,state;
state = OUT;
nl = nw = nc = 0;
while ((c = getchar())!=EOF) {
++nc;
if (c=='\n') {
++nl;
}
if (c==' '||c=='\n'||c=='\t') {
state = OUT;
else if (state == OUT) {
state = IN;
++nw;
}
}
printf("%d %d %d\n",nl,nw,nc);
}
}
初学C语言,以上代码摘自《C程序设计语言》第二版 新版,在Xcode中编译提示错误,错误标识指向else,内容为Expected expreesion,请问是什么原因。
16 行行末少了一个右花括号,20 行则多了一个右花括号,建议检查视力