Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

不知道为什么错,哪位大牛帮忙一下啊

Posted by liguanbin at 2007-03-29 02:35:27 on Problem 1488
#include<iostream>
#include<string>
#include<queue>
using namespace std;
int main()
{

 int flag=0;
 queue<char>  a;
	 char c;

 while((c=cin.get())!=EOF)
 {
  if(c!='\n')
  {
    if(c=='"')
    {
     if(flag==0)
    {
     a.push('`');
     a.push('`');
     flag=1;
    }
    else
    {
     a.push('\'');
     a.push('\'');
  
     flag=0;
    }
  }  
    else 
    {
    a.push(c);

    }
  }
  else 
  {
   while(!a.empty())
   {cout<<a.front();
    a.pop();
   }
   cout<<endl;
  
  }
 
 }return 0;
}


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator