Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
又是stl// 22.cpp : Defines the entry point for the console application. // //#include "stdafx.h" #include<fstream> #include<string> #include<iostream> using namespace std; int main(int argc, char* argv[]) { //ifstream cin("aaa.txt"); char ss[200]; string s; int p=1; while(cin.getline(ss,200)) { s=ss; while(1) { if(s.find('"')!=4294967295&&p==1) { s.replace(s.find('"'),1,"``"); p=2; } if(s.find('"')!=4294967295&&p==2) { s.replace(s.find('"'),1,"''"); p=1; } else break; } cout<<s<<endl; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator