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> #include<string.h> int main() { int i,u; char s1[100][70],s2[100][70]; for(i=1;i<100;i++) s2[i][0]='0'; strcpy(s1[0],"http://www.acm.org/"); strcpy(s2[0],"http://www.acm.org/"); for(i=1;i<100;i++) { gets(s1[i]); if(!strcmp(s1[i],"QUIT"))break; switch(s1[i][0]) { case'V': { for(u=6;s1[i][u]!='\0';u++) s2[i][u-6]=s1[i][u]; s2[i][u-6]='\0'; printf("%s\n",s2[i]); }break; case'B':{ i-=2; if(i<0){printf("Ignored\n");i=0;} else printf("%s\n",s2[i]); }break; case'F':{ if(s2[i][0]=='0'){printf("Ignored\n");i--;} else printf("%s\n",s2[i]); }break; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator