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 result (int b1,int b2,int b3,int b4) { while ((b1 - b2) % 28 || (b1 - b3) % 33 ||(b1 - b4) <= 0) { b1 += 23; } return b1-b4; } int main (void) { int a,b,c,d,i=1; scanf("%i%i%i%i",&a,&b,&c,&d); while(a !=-1 || b !=-1 || c !=-1 || d !=-1) { printf("Case %i: the next triple peak occurs in %i days.\n",i++,result (a,b,c,d)); scanf("%i%i%i%i",&a,&b,&c,&d); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator