#13871: 答案


elvisliu (方塊)

學校 : 臺北市私立延平高級中學
編號 : 69054
來源 : [203.72.178.252]
最後登入時間 :
2018-12-19 17:05:19
c007. 00272 - TeX Quotes -- UVa272 | From: [203.72.178.252] | 發表日期 : 2018-05-10 17:22

#include using namespace std ;

int main() {

int n=1;

char c;

while(cin.get(c))

{

    if(c=='"')

    if(n++%2) cout<<"``"; else cout<<"''"; else cout<<c;  

}  

}

 
#13872: Re:答案


elvisliu (方塊)

學校 : 臺北市私立延平高級中學
編號 : 69054
來源 : [203.72.178.252]
最後登入時間 :
2018-12-19 17:05:19
c007. 00272 - TeX Quotes -- UVa272 | From: [203.72.178.252] | 發表日期 : 2018-05-10 17:24

#include using namespace std ;

using namespace std ;

int main() {

int n=1;

char c;

while(cin.get(c))

{

    if(c=='"')

    if(n++%2) cout<<"``"; else cout<<"''"; else cout<<c;  

}  

}




 
ZeroJudge Forum