这代码错在哪?
#include <stdio.h>#define OUT 0
#define IN 1
void main()
{
int nl , nw , nc , c , state;
state = OUT;
nl = nw = nc = c = 0;
while ( ( c = getchar() ) != EOF )
{
++nc;
if ( c == '\n' )
++nl;
if ( c == ' ' || c == '\t' || c == '\n')
state = OUT;
else if ( state == OUT )
{
state = IN;
++ nw;
}
}
printf("\n本段有%d个字符\t%d个单词\t%d行\n", nc , nw , nl );
}
为什么下面的printf好像没有运行其他的大概都没错