#include "stdio.h" main() { long nc; nc=0; while(getchar()!='\n') //这里是这样的吧= = '\n'代表换行符,'EOF'代表文件的结尾 nc++; printf("%d\n",nc); }