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 |
哪位DD帮我看看吧!郁闷很久了,为什么WA#include <stdio.h> int main() { char s[100][70],c[10]; int i=1; strcpy(s[1],"http://www.acm.org/"); while(scanf("%s",c)&&strcmp(c,"QUIT")) { if(!strcmp(c,"VISIT")) { i++; scanf("%s",s[i]); printf("%s\n",s[i]); } if(!strcmp(c,"BACK")) { if(strlen(s[--i])>0) printf("%s\n",s[i]); else {printf("Ignored\n");i++;} } if(!strcmp(c,"FORWARD")) { if(strlen(s[++i])>0) printf("%s\n",s[i]); else {printf("Ignored\n");i--;} } } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator