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 |
谁帮偶看一下呀!!,偶已经错了几十次了呀!!实在是郁闷了,打算放弃了!!#include<stdio.h> int main() { int i,j,k,m,n; int flag=0; char a[1000],c; i=0; //c=getchar(); while((c=getchar())!=EOF) { if(c!='\n') { if(c=='"') { if(flag==0) { a[i]='`'; a[++i]='`'; flag=1; i++; } else { a[i]='\''; a[++i]='\''; //a[i]=c; i++; flag=0; } }//if else { a[i]=c; i++; } } else { for(j=0;j<i;j++) printf("%c",a[j]); printf("\n"); i=0; } } }//main Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator