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 649594834 at 2011-01-26 12:26:15 on Problem 1028
#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:
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