博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C - The C Answer (2nd Edition) - Exercise 1-12
阅读量:6947 次
发布时间:2019-06-27

本文共 516 字,大约阅读时间需要 1 分钟。

/* Write a program that prints its input one word per line. */#include 
#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); } } }}

转载地址:http://pbenl.baihongyu.com/

你可能感兴趣的文章
祖玛右上角
查看>>
JSP-06-使用JDBC操作数据库
查看>>
使用Netty3或Netty4发布Http协议服务
查看>>
选择交换机和选择路由器的主要技能指标
查看>>
as3 用StyleSheet css 设置文本样式
查看>>
Bootstrap3 代码-变量
查看>>
转 数据库常用命令
查看>>
android--显式跳转和隐式跳转
查看>>
PHP和JS判断访问客户端的是PC还是移动设备
查看>>
FreeCodeCamp:Chunky Monkey
查看>>
MySQL数据库/数据表/字段--字符集查看/修改
查看>>
JavaScript核心语法学习部分(五)
查看>>
Error: php71w-common conflicts with php-common-5.4.16-46.el7.x86_64
查看>>
初探 回文树
查看>>
SQL根据列值查询表
查看>>
php 操作webservice实例
查看>>
Python初学练习03:简易ATM系统-前端
查看>>
浮点数到整数的快速转换
查看>>
cacti服务器处理
查看>>
我的友情链接
查看>>