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 三少_爷 阅读(152) 评论(0)  编辑 收藏 引用 所属分类: the c programming language


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


<2024年9月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

导航

统计

常用链接

留言簿

随笔分类

随笔档案

My Website

搜索

最新评论

阅读排行榜

评论排行榜