| ||||||||||
| 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 | |||||||||
一直WA....高手们帮慢看哈!!.....谢谢哈#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char a,b[100];
int i=0, k=0, flag=0;
while(scanf("%c",&a)!=EOF){
if(a != '\n'){
if(a == '"'){
if(flag == 0){
b[k]='`';
b[++k]='`';
flag=1;
k++;
}
else {
b[k]='\'';
b[++k]='\'';
k++;
flag=0;
}
}
else{
b[k]=a;
k++;
}
}
else
{
for(i=0;i<k;i++)
{
printf("%c",b[i]);
}
printf("\n");
k=0;
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator