/* Write a program that prints its input one word per line. */

#include <stdio.h>

#define IN  1  /* inside a word  */
#define OUT 0 /* outside a word */ /* print input one word per line */
main()
{
int c, state = OUT;
while((c = getchar()) != EOF)
{
if(c == ' ' || c == '\n' || c == '\t')
{
if(state == IN)
{
putchar('\n'); /* finish the word */
state = OUT;
}
else if(state == OUT)
{
state = IN; /* beginning of word */
putchar(c);
}
else /* inside a word */
{
putchar(c);
}
}
}
}

最新文章

  1. Java框架Struts2
  2. hibernate.cfg.xml配置文件和hbm.xml配置文件
  3. POJ 1364 King --差分约束第一题
  4. 虚拟化之xenserver
  5. Win7系统上配置使用Intellij Idea 13的SVN插件
  6. C#怎么得到主机名,IP,MAC
  7. Gmail POP3设定
  8. vue组件,可以通过npm引用的组件
  9. 高性能Mysql笔记 — 索引
  10. HDU 5113
  11. linux每日命令(12):nl命令
  12. DQL完整语法及示例
  13. XML中的变量传值
  14. 设置linux的console为串口【转】
  15. shell升级
  16. 在ASP.NET MVC下实现单个图片上传, 客户端服务端双重限制图片大小和格式, 服务端裁剪图片
  17. 新的Blog
  18. 转 C#高性能Socket服务器SocketAsyncEventArgs的实现(IOCP)
  19. solaris之cpu
  20. MyEclipse项目如何导入到Eclipse

热门文章

  1. centos7最小化安装Oracle11gR2
  2. 2019-03-18 Python time 将2015年11月20日转换为2015-11-20
  3. VUE:路由
  4. Crontab入门基础
  5. LeetCode 11. Container With Most Water 单调队列
  6. React基础知识点全解
  7. FastDFS架构
  8. [terry笔记]对人员列表文件进行数据库操作
  9. 简单谈谈MySQL优化利器-慢查询
  10. nodejs即时聊天