| ||||||||||
| 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 p,e,i,d,x,j=1;
scanf("%d%d%d%d",&p,&e,&i,&d);
while(p!=-1&&e!=-1&&i!=-1)
{
x=(1288*i+14421*e+5544*p)%21252;
if(x==0)
printf("Case %d: the next triple peak occurs in 21252 days.\n",j);
else
printf("Case %d: the next triple peak occurs in %d days.\n",j,x-d);
j++;
scanf("%d%d%d%d",&p,&e,&i,&d);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator