虚心
我是菜鸟,问个很初级的问题,请别笑话,因为确实不明白,书上的一个例子:#include<stdio.h>
main()
{
long nc;
while(getchar() != EOF)
++nc;
printf("%d\n",nc);
}
请问这个程序输入什么才能结束?我无论输入什么都结束不了
2008-04-28 21:21
2008-04-28 21:28
2008-04-28 21:42
2008-04-28 21:47

2008-04-28 21:58
2008-04-28 22:01
2008-04-28 22:11
2008-04-28 22:18
2008-04-28 22:19
程序代码:
#include<stdio.h>
int main()
{
long nc=0;
while(getchar() != EOF)
++nc;
printf("%ld\n",nc);
return 0;
}
2008-04-28 22:35