博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
poj 1488 TEX Quotes 双引号的改写 (☆☆☆☆☆)
阅读量:6884 次
发布时间:2019-06-27

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

曾经做过一个类似的,也是对双引号进行修改。

这题要使用整行读人,我习惯使用gets()函数,当然也有其他的函数get(cin,string s)、cin.getline(charArray, max_length,'\n')。但有时做字符串题时会发生与换行符有关的错误,不能理解!

Sample Input

"To be or not to be," quoth the Bard, "thatis the question".The programming contestant replied: "I must disagree.To `C' or not to `C', that is The Question!"

Sample Output

``To be or not to be,'' quoth the Bard, ``thatis the question''.The programming contestant replied: ``I must disagree.To `C' or not to `C', that is The Question!''

 

Source Code
#include 
#include
const int N = 1000;int main(){
int i,j,cnt=0; char src[N],dst[N]; while(gets(src)){
for(i=j=0;i

转载于:https://www.cnblogs.com/pcwl/archive/2011/04/26/2029717.html

你可能感兴趣的文章
关于scrapy的piplines
查看>>
通向架构师的道路(第一天)之Apache整合Tomcat - lifetragedy的专栏 - 博客频道 - CSDN.NET...
查看>>
Javascript创建对象的7种模式
查看>>
Shell工作笔记01
查看>>
项目、软件开发过程中版本术语
查看>>
CSS实现背景透明,文字不透明(各浏览器兼容)
查看>>
【转】[大学引导]超级链接、字体颜色、音乐播放公式
查看>>
T-SQL中INSERT、UPDATE
查看>>
Linux下Nginx服务器配置Modsecurity实现Web应用防护系统
查看>>
openSUSE13.2安装ruby和rails
查看>>
python 高级函数
查看>>
F.Cards with Numbers
查看>>
简单入门Buffer
查看>>
OO第四阶段总结
查看>>
javascript总结02
查看>>
创建windows服务
查看>>
HTML5 入门基础
查看>>
【转载】读懂IL代码就这么简单(二)
查看>>
C++文件操作(fstream)
查看>>
用main函数传参做简单的计算器的代码
查看>>