使用for
循环:
double count;
for(count = 0; getchar() != EOF; ++count)
; /* null statement */
printf("%.0f/n", count);
使用while
循环:
long count = 0;
while(getchar() != EOF)
++count;
printf("%ld/n", count);
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266631.html