| ||||||||||
| 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 | |||||||||
Re:我写的答案一样啊,为什么WA??帮帮忙In Reply To:我写的答案一样啊,为什么WA??帮帮忙 Posted by:04369086 at 2006-09-04 15:19:04 #include <stdio.h>
char str[1000];
int main()
{
int first = 0;
int i;
// printf("%d\n", '"');
while(gets(str))
{
for(i = 0; str[i] != '\0'; i++)
{
if(str[i] == '"')
{
if(first == 0)
{
printf("``");
first = 1;
}
else
{
printf("''");
first = 0;
}
}
else
{
printf("%c", str[i]);
}
}
printf("\n");
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator