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   知识库   博问   管理


<2012年5月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

导航

统计

常用链接

留言簿

随笔分类

随笔档案

My Website

搜索

最新评论

阅读排行榜

评论排行榜