| ||||||||||
| 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 | |||||||||
请问,我这个1006题的程序哪里错了?main()
{
int p,e,i,d;
int a=0,b,t[365];
while(1)
{ scanf("%d%d%d%d",&p,&e,&i,&d);
if(p==-1&&e==-1&&i==-1&&d==-1)
break;
else
for(i=i+33;;i=i+33)
{ if((i-e)%28==0)
{ if((i-p)%23==0)
{ t[a]=i-d;
a++;
break;
}
else continue;
}
else continue;
}
}
for(b=a,a=0;a<b;a++)
printf("\nCase %d: the next triple peak occurs in %d days.",a+1,t[a]);
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator