您的位置:首页 > 其它

POJ 1488

2015-06-09 14:07 260 查看
#include <iostream>
#include <string>
using namespace std;

int main()
{
string s;
int i;
bool boo;
bool boo_1;
boo = false;
boo_1 = false;
//freopen("acm.acm","r",stdin);
while(getline(cin,s))
{

for(i = 0; i < s.length(); ++ i)
{
if(s[i] == '"')
{
if(!boo)
{
cout<<'`'<<'`';
boo = true;
}
else
{
cout<<'\''<<'\'';
boo = false;
}
}
else
{
cout<<s[i];
}
}
cout<<endl;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: