Write a program that prints its input one word per line.
#include <stdio.h> #define State '\n'
void main()
{
int Juge=;/*only one space*/ int c=;
while((c=getchar())!=EOF)
{
if(c==' '||c=='\t'||c=='\b')
{
if(Juge==)
{
putchar(State);
Juge=;
}
}
else
{
putchar(c);
Juge=;
}
} }
I Love U
I
Love
U
Write a program that prints its input one word per line.的更多相关文章
- Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b, and each backslash by \\. This makes tabs and backspa
#include <stdio.h> #define DBS '\\' void main() { int c; while((c=getchar())!=EOF) { if(c=='\t ...
- Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank.
#include <stdio.h> void main() { int c,c_BCN; while((c=getchar())!=EOF) { if(c!=' ') c_BCN=; i ...
- jquery mobile - select and input - horizontal - in same line
控件组合的水平布局 select + input 在同一行 注意jquery mobile 的js 和css 的版本, 一些低版本 估计不支持 <!DOCTYPE html> <ht ...
- C程序设计语言(第二版)习题:第一章
第一章虽然感觉不像是个习题.但是我还是认真去做,去想,仅此而已! 练习 1-1 Run the "hello, world" program on your system. Exp ...
- C - The C Answer (2nd Edition) - Exercise 1-12
/* Write a program that prints its input one word per line. */ #include <stdio.h> #define IN 1 ...
- C lang:character input and output (I/O)
Xx_Introduction Character input and output is by more line character conpose of the text flow Defin ...
- zoj 2921 Stock(贪心)
Optiver sponsored problem. After years of hard work Optiver has developed a mathematical model that ...
- ACM-ICPC 2016 Qingdao Preliminary Contest
A I Count Two Three I will show you the most popular board game in the Shanghai Ingress Resistance T ...
- 100+ Python挑战性编程练习(2)
熟能生巧,多撸代码多读书 https://github.com/zhiwehu/Python-programming-exercises/blob/master/100+%20Python%20cha ...
随机推荐
- sqlite使用dbexpress时数据库不存在自动建立数据库
在发布使用delphi dbexpress编写的基于SQLITE的程序时,需要在运行时判断某个数据库是否存在,如果不存在,则自动建立. 方法有2,其中之一是判断数据库文件是否存在,如果不存在,则创建一 ...
- Python学习之计算机基础
计算机基础: (1)计算机俗称电脑,是现代用于高速计算的电子计算器,可以进行数值计算也可以进行逻辑计算,还有存储记忆功能.是能够按照程序运行,自动,高速处理海量数据的现代化智能 电子设备. (2)物理 ...
- EIGRP-12-弥散更新算法-DUAL的FSM(*没写完)
FD (可行距离).后继和可行后继.本地计算和弥散计算(随着查询包的发出而扩散,随着响应包的接收而收敛)一到目前为止介绍的这些机制能够使路由器有效地计算出去往某目地的新路径,只要在整个弥散计算中不再出 ...
- (六)POI-操作Excel的poi的字体设置
原文链接:https://blog.csdn.net/class157/article/details/92817286 package com.java.poi; import org.apache ...
- Android学习笔记使用AlertDialog实现对话框
使用AlertDialog可以实现如下对话框 案例 布局问文件就加了几个Button,我直接上Java代码了 实现显示带取消,确定按钮的对话框按钮 Button showDialogOne = fin ...
- GitHub如何回滚代码?
1.git log 查看commit hash值 执行git log:查看commit hash值. 2.执行git reset --hard xxxx xxxx表示的是commit hash 值. ...
- 恕我直言你可能真的不会java第3篇:Stream的Filter与谓词逻辑
一.基础代码准备 建立一个实体类,该实体类有五个属性.下面的代码使用了lombok的注解Data.AllArgsConstructor,这样我们就不用写get.set方法和全参构造函数了.lombok ...
- Python学习手册(第4版) - 专业程序员的养成完整版PDF免费下载_百度云盘
Python学习手册(第4版) - 专业程序员的养成完整版PDF免费下载_百度云盘 提取码:g7v1 作者简介 作为全球Python培训界的领军人物,<Python学习手册:第4版>作者M ...
- 从一个计算器开始说起——C#中的工厂方法模式
工厂模式作为很常见的设计模式,在日常工作中出镜率非常高,程序员们一定要掌握它的用法哟,今天跟着老胡一起来看看吧. 举个例子 现在先让我们来看一个例子吧,比如,要开发一个简单的计算器,完成加减功能,通过 ...
- 【SEED Labs】DNS Rebinding Attack Lab
Lab Overview 实验环境下载:https://seedsecuritylabs.org/Labs_16.04/Networking/DNS_Rebinding/ 在这个实验中模拟的物联网设备 ...