character counting

  1 #include <stdio.h>
  2 
  3 void main()
  4 {
  5         int nc;
  6 
  7         nc = 0;
  8         while(getchar() != EOF)
  9         {
 10                 nc++;
 11         }
 12         printf("%d\n",nc);
 13 }

posted on 2012-05-19 22:08 三少_爷 阅读(142) 评论(0)  编辑 收藏 引用 所属分类: the c programming language


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

导航

统计

常用链接

留言簿

随笔分类

随笔档案

My Website

搜索

最新评论

阅读排行榜

评论排行榜