C - The C Answer (2nd Edition) - Exercise 1-8
来源:互联网 发布:淘宝开店图片怎么弄 编辑:程序博客网 时间:2024/04/30 22:41
/*Write a program to count blanks, tabs, and newlines.*/#include <stdio.h>/* count blanks, tabs, and newlines */main(){int c, nb, nt, nl;nb = 0; /* number of blanks */nt = 0; /* number of tabs */nl = 0; /* number of newlines */while((c = getchar()) != EOF){if(c == ' '){++nb;}if(c == '\t'){++nt;}if(c == '\n'){++nl;}} printf("%d %d %d\n", nb, nt, nl);}
1 0
- C - The C Answer (2nd Edition) - Exercise 1-8
- C - The C Answer (2nd Edition) - Exercise 1-2
- C - The C Answer (2nd Edition) - Exercise 1-1
- C - The C Answer (2nd Edition) - Exercise 1-3
- C - The C Answer (2nd Edition) - Exercise 1-4
- C - The C Answer (2nd Edition) - Exercise 1-5
- C - The C Answer (2nd Edition) - Exercise 1-6
- C - The C Answer (2nd Edition) - Exercise 1-7
- C - The C Answer (2nd Edition) - Exercise 1-9
- C - The C Answer (2nd Edition) - Exercise 1-10
- C - The C Answer (2nd Edition) - Exercise 1-11
- C - The C Answer (2nd Edition) - Exercise 1-12
- C - The C Answer (2nd Edition) - Exercise 1-13
- C - The C Answer (2nd Edition) - Exercise 1-14
- C - The C Answer (2nd Edition) - Exercise 1-15
- C - The C Answer (2nd Edition) - Exercise 1-16
- C - The C Answer (2nd Edition) - Exercise 1-17
- C - The C Answer (2nd Edition) - Exercise 1-18
- XUtils数据库模块在多线程中的打开与关闭问题
- 03 storm 源码阅读 storm的进程间消息通信实现clojure端 加载java端netty能力
- POJ 1990 MooFest
- Java中的线程Thread方法之---interrupt()
- git 学习笔记2-linux上安装git
- C - The C Answer (2nd Edition) - Exercise 1-8
- 04storm 源码阅读 storm的进程间消息通信实现clojure端 生成带netty能力的线程
- android状态栏一体化(改变状态栏的背景颜色)开源工程推荐
- leetCode 46.Permutations(排列组合) 解题思路和方法
- shell学习四十三天----临时性文件的建立与使用
- CodeVS 1166 矩阵取数游戏(区间DP+高精度)
- PS文字工具
- 简单的球的运动
- 商人过河问题