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 ...
随机推荐
- java实现第四届蓝桥杯连续奇数和
连续奇数和 题目描述 小明看到一本书上写着:任何数字的立方都可以表示为连续奇数的和. 比如: 2^3 = 8 = 3 + 5 3^3 = 27 = 7 + 9 + 11 4^3 = 64 = 1 + ...
- Linux 文件特殊权限-SetGID
SUID只针对二进制可执行文件,而SGID可以针对二进制文件,这时它和SUID非常类似,命令执行在执行程序的时候,组身份变换为该文件的属组,最常见的locate命令,普通用户也可以搜索文件目录,它也可 ...
- Django如何上传图片并对上传图片进行访问
通过一个示例的完整演示过程,来学习django如何上传图片,以及对于media文件夹中的上传图片进行请求: 1.配置settings.py MEDIA_URL = '/media/' MEDIA_RO ...
- VMware15 镜像Centos7修改静态IP
VMware15 镜像Centos7修改静态IP * 我的网卡名称为ens33: * 配置IP在 /etc/sysconfig/network-scripts/ifcfg-ens33 目录下: * D ...
- R调用python模块
明明已经安装了sctransfer,但仍然显示没有该模块 Error in py_module_import(module, convert = convert) : ModuleNotFoundEr ...
- Spring:工厂模式哪里解耦了?
菜瓜:我一定是太菜了,为什么别人说Spring屏蔽了new关键字创建对象就很丝滑?我完全get不到这个操作的好处啊,我自己写new它也很香啊 水稻:emmmm,换个角度想啊,如果把现在用的注解@Aut ...
- 容器编排工具之Docker-compose
前文我们聊了下docker私有仓库harbor的搭建,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/13061984.html:在上一篇博客的末尾,我们简单聊了 ...
- [CF1270F]Awesome Substrings
题目 点这里看题目. 分析 设前缀和\(s_r=\sum_{i=1}^r [S_i='1']\) 考虑满足要求的子串\((l,r]\)的要求: \[\exists k\in N_+, r- ...
- flutter-web利用dart js 库发起http request
初学flutter,初学前端,尝试在dart中直接使用HttpClient时,直接报出Platform not supported,查资料发现他还不支持浏览器. 通过查阅资料发现可以借助axios 与 ...
- (十)HttpClient以multipart/form-data上传文件
原文链接:https://blog.csdn.net/wsdtq123/article/details/78888734 POST上传文件 最早的HTTP POST是不支持文件上传的,给编程开发带来很 ...