标签:
1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 int main() 6 { 7 string s; 8 int i; 9 bool boo; 10 bool boo_1; 11 boo = false; 12 boo_1 = false; 13 //freopen("acm.acm","r",stdin); 14 while(getline(cin,s)) 15 { 16 17 for(i = 0; i < s.length(); ++ i) 18 { 19 if(s[i] == ‘"‘) 20 { 21 if(!boo) 22 { 23 cout<<‘`‘<<‘`‘; 24 boo = true; 25 } 26 else 27 { 28 cout<<‘\‘‘<<‘\‘‘; 29 boo = false; 30 } 31 } 32 else 33 { 34 cout<<s[i]; 35 } 36 } 37 cout<<endl; 38 } 39 }
标签:
原文地址:http://www.cnblogs.com/gavinsp/p/4563418.html