字符计数

# include<stdio.h>
/* 统计输入的字符数*/
main()
{
   double nc;
   for (nc = 0;getchar()!=EOF;++nc)
   ;
   printf("%.0f
",nc);
}
原文地址:https://www.cnblogs.com/ligongye/p/3374768.html