| ||||||||||
| 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 | |||||||||
不知道为什么错,哪位大牛帮忙一下啊
#include<iostream>
#include<string>
#include<queue>
using namespace std;
int main()
{
int flag=0;
queue<char> a;
char c;
while((c=cin.get())!=EOF)
{
if(c!='\n')
{
if(c=='"')
{
if(flag==0)
{
a.push('`');
a.push('`');
flag=1;
}
else
{
a.push('\'');
a.push('\'');
flag=0;
}
}
else
{
a.push(c);
}
}
else
{
while(!a.empty())
{cout<<a.front();
a.pop();
}
cout<<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